I am seeing this behavior in my grid control.
I have a combo box and when an item is selected, the grid control is populated with data based on the selection. I have see that when I move between two items in a combo box, the grid seems to flicker and I can see the action of clearing out grid(which I do in code) and repopulating it. Is there any property I can set for the grid so that this does not happen?
AD
Administrator
Syncfusion Team
January 19, 2007 03:20 PM UTC
Does someone have an answer to this problem? Thanks.
>I am seeing this behavior in my grid control.
I have a combo box and when an item is selected, the grid control is populated with data based on the selection. I have see that when I move between two items in a combo box, the grid seems to flicker and I can see the action of clearing out grid(which I do in code) and repopulating it. Is there any property I can set for the grid so that this does not happen?
AD
Administrator
Syncfusion Team
January 19, 2007 03:55 PM UTC
Hi Matt,
The flickering problem can be avoided by populating the grid between the BeginUpdate() and EndUpdate() calls.
grid.BeginUpdate();
////code///
grid.EndUpdate( false );
Let me know if this helps.
Best Regards,
Haneef
AD
Administrator
Syncfusion Team
January 19, 2007 10:38 PM UTC
Haneef,
That did not solve it.
I will try and describe to you the events.
1. A blank form opens with no selections. I have initialized the grid with default values. (Some cells can only have the value of "1" and are read only etc.)
2. A user then can select a value from a combobox and the grid is populated. I set IgnoreReadOnly property to true, clear the cells and then re-populate it with the data selected. This is when I have an issue with flickering. If I keep changing the selecting from the combobox by pressing the down arrow key, the grid as it's being populated flickers.
If I populate the grid values between Grid.BeginUpdate() and Grid.EndUpdate(false), I can't see any of the data or the cell headers on the grid. If I mouse over the header cell's it shows the data of that cell but all the other cells, no data.
Some times when I am debugging, I can see the values. I am not sure what I am missing. Let me know if you have any thoughts on this or if you have any questions.
Thanks again for you help.
Matt.
AD
Administrator
Syncfusion Team
January 19, 2007 10:50 PM UTC
Hi Matt,
Try calling Invalidate method to refresh the grid.
grid.BeginUpdate();
////code///
grid.Invalidate();
grid.EndUpdate( false );
Best Regards,
Haneef