I am facing a problem with DataBoundGrid refreshing.
My grid is wired with FilterBar and the data gets refreshed in each 5 seconds. In order to reflect the data change, I wire the filterbar each time the grid data is updated. This works fine if no grid columns are sorted.
If we sort any of the columns, the grid starts to show refresh issues. The grid gives the feedback of updating row by row and filter gets removed first and then get in place again. User is able to see all these and is annoying.
And all the refreshing logic is with in BeginUpdate() and EndUpdate().
Do you have any idea , why this is happening and any solution for this?
thanks in advance,
ADAdministrator Syncfusion Team February 23, 2004 11:06 PM UTC
The sorting triggers a ListChanged.Reset event, and this resets the grid and cancels the BeginUpdate.
There is another technique that you can use to freeze painting in a Windows Forms control. This technique has handled this ListChanged.reset problem in other situations.
Here is a sample. It adds a new property to a derived grid that adds a second way to freeze the screen painting through a Win32 API call. This techique is discussed in one of our Windows Forms FAQ,
This sample freezes painting while trying to sort an expanded grid so the expand state can be preserved during sorting. In your case, I think you can add the new property to a derived grid, and use this property instead of grid.BeginUpdate to freeze painting while you do your update.
BDBidin DinesababuFebruary 23, 2004 11:37 PM UTC
It worked Perfect!
Thank you very much for quick response.