We have a GridDataBoundGrid that takes a long time to redraw. If there are one or two rows the delay is short. If there are 20 rows the delay can be 20-25 seconds.
We are using multiple GridDataBoundGrids in our VB.Net application and don''t experience this problem in any of the others. We can''t identify any events in our code that are associated with the problem. We are not using PrepareStyleInfo or QueryCellInfo on this grid. The only other visual settings we are making are column widths.
The problem occurs when we refilter the datasource to display a new set of data in the grid. But it also occurs when we go to another form or another application and then return to the form with the grid. In other words we can wait the 10-25 seconds for it to refresh, go to another application, and come back and have to wait 10-25 seconds again. There are also delays when using the scroll bar. The scroll bar will move instantly but the data won''t scroll for a long time.
The grid is bound to the dataview of a data table. It only has 9 columns (2 hidden).
Any ideas what could be causing this?
ADAdministrator Syncfusion Team August 19, 2004 10:44 AM
Check the output window to see if any exceptions are being thrown.
Also, check whether you have debug output that is slowing things down.
GSGreg ShometteAugust 19, 2004 01:49 PM
Thanks for the quick response.
The output did not reveal any errors and the Debug output seemed to be normal.
I discovered that the grid would redraw fine when it was covered except for one column. That column has a GridListControl just like the column next to it. If I commented out the grid.StyleInfo.DisplayMember and ValueMember properties then the redraw problem went away. Of course now the ID number is what is displayed. The column next to this one has the exact same settings (except for the values given to the DisplayMember and ValueMember properties) and it doesn''t cause a problem. The other difference between the two columns is that the value for the one that works is a string and the problem column uses an integer value.
For now I can solve the problem by using a ComboBox in that column, but then I am limited to one column in the dropdown.
Any ideas about why this issue is occuring and how I might solve it?
ADAdministrator Syncfusion Team August 19, 2004 02:24 PM
Are you using 184.108.40.206? There was some slow drawing of dropdown lists in earlier versions.
Are there significant differences in the size of the lists that are in the slow dropdown column an dthe one that is not slow? Do they both have the same DropDownStyles?
If you set the debugger to break on any common language runtime exception, does it break when this slow column tries to draw?