The blog of roncli blog
Houston, Texas, United States
CTG Music
Trax in Space Beta
Recent Posts
Track 7 Still Rules
AJAX not ready for prime time just yet
Where have the days gone?
SQL Server & Visual Studio 2005
Due Process
And to top off my night...
A story
Another Late Night
Sunday, November 27, 2005
DataGridView is crap
Posted: 6:48:00 AM 1 comments
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.

Labels: ,


  Blogger roncli @ 11/28/2005 02:49:00 AM:
And yes, I forgot about ListView in Details view. I found it since and used it, double buffered, as an acceptable solution.

Post a Comment