JumpyNET Posted January 27, 2006 Posted January 27, 2006 The new DataGridView is really slow. :( The old MSFlexGrid was super fast compared to it's new replacement. Is there a way how I could speed up the DataGridView or am I the only one experiencing this problem? Or is there an alternative? PS: I'm using VB 2005 Express and I don't need the database features. Quote
Nate Bross Posted January 27, 2006 Posted January 27, 2006 I'm using a DataGridView in a current project and I've noticed it's rather slow; fourenatly I'm only using it to help with development so it wont slow down the final release. I don't know of a good alternitive but if you find one please post for the rest of us! Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Joe Mamma Posted January 28, 2006 Posted January 28, 2006 The new DataGridView is really slow. :( The old MSFlexGrid was super fast compared to it's new replacement. Is there a way how I could speed up the DataGridView or am I the only one experiencing this problem? Or is there an alternative? PS: I'm using VB 2005 Express and I don't need the database features.umm. .. are you using that bassackwards approach of loading the grid manually (like the morons at xtremeVBtalk suggest you use the flexgrids) or are you binding your collection to it? Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
JumpyNET Posted January 28, 2006 Author Posted January 28, 2006 umm. .. are you using that bassackwards approach of loading the grid manually (like the morons at xtremeVBtalk suggest you use the flexgrids) or are you binding your collection to it? I'm not quite sure what you mean, but I'll try to answer: 1) I've simply placed a DataGridView to my form by dragging it from the toolbox. 2) I edited the columns on the designer (Properties -> Misc -> Columns) 3) And in the code I add rows like this: DataGridView.Rows.Add("Aaaa", "Bbbbbb", "Ccccc") 4) Also the user can edit certain cells. Quote
Igor Sukhov Posted January 28, 2006 Posted January 28, 2006 The new DataGridView is really slow. :( The old MSFlexGrid was super fast compared to it's new replacement. Is there a way how I could speed up the DataGridView or am I the only one experiencing this problem? Or is there an alternative? PS: I'm using VB 2005 Express and I don't need the database features. DataGridView uses GDI+ drawing engine and for this reason it's rather slow. Wait for video cards with built-in GDI+ accelerators or start using 3rd party grid controls. Quote
Nate Bross Posted January 28, 2006 Posted January 28, 2006 Yes, it draws slowly. If you watch how many records it processes, it takes as long to do the first x (that show up on the form) as it takes to add the rest out of 'scrolling range' if you will. I tried to use the DGV.DataSource = MyCollection; however, whenever I did this it would not properly display the data. Unfourenatly I cannot run any sequal on my data so I get everything and have to manually weed out what I don't want. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Joe Mamma Posted January 29, 2006 Posted January 29, 2006 create a class to wrap your data - MyDataClass . declare a BindingList(MyDataClass) - MyBindingList load MyBindingList with instances of your class Set the DataSource of the grid to MyBindingList Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
Gianlu83 Posted January 21, 2009 Posted January 21, 2009 Hello, I have the same problem too. DataGridView control is very slow when I load a lot of data. Where can I find a complete and detailed example making this: create a class to wrap your data - MyDataClass. declare a BindingList (MyDataClass) - MyBindingList load MyBindingList with instances of your class Set the DataSource of the grid to MyBindingList In this way, i will be able to solve my problem of performance? Quote
stumper66 Posted January 28, 2009 Posted January 28, 2009 I use DGVs all the time and think they are just fine, speed wise. Are you calling .BeginEdit() and .EndEdit() when loading lots of data records? If not, I can see why it's slow, as it's redrawing with every data row that's added. Quote
rocket Posted August 31, 2010 Posted August 31, 2010 I found the solution here... it sped up my Datagridview * 20 http://rdatagridview.blogspot.com/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.