Music. Coding. Gaming. Life.

DataGridView is crap

Posted Sunday, November 27th, 2005 12:48:00 pm
It is interesting... Microsoft's .NET framework is very complete in most areas, but it seems like Microsoft decided to not pay attention to certain things.

Like grids. The DataGridView, the only way capable of displaying and manipulating tabular data provided by the standard control suite, is terrible. You would think that this is a basic necessity when it comes to designing a GUI, yet Microsoft, through VB.Net 2005, still has not gotten it right.

In Due Process, I want to create a list of processes, along with some selected data for each process, and display it to the user so that they can view and sort the data with relative ease. Of course, some things, like CPU time, change constantly, so I refresh the data every second.

DataGridView doesn't like this. If you just set a binding and go with it, it will update the grid every time data's changed. I'm not talking the once per second or so that it refreshes, I'm talking about every time it iterates through the list of processes and updates a single value. Every time it has to refresh the grid.

And there's no way, at least none that I've found, of stopping this. The closest I've come is by using a BindingSource and shutting off the sending of events. But then you can't reload the data automatically. If you try to do it manually, it eats processor. I know it's not the actual updating of the data, because when I was doing this in VB.Net 2003, it was taking no time at all.

Of course, in VB.Net 2003, I was using a 3rd party control that's not compatible with the .NET 2.0 framework, so now I'm stuck with having to redo the way this program works entirely, which sucks.

Comments

Loading...
roncli.com Media Player