We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Hidding and Showing Rows in Grid

I'm simply using the hidden field on a row to hide and unhide a subset of all the rows in the grid. I use beginupdate at the start and endupdate once I have changed the hidden state of the rows. When I show rows that were previously hidden above the current set of shown rows the grid flickers when it refreshes. Is there a way to get round this? as it doesnt happen when I show rows below the currently shown selection

3 Replies

EC Eric Carley May 24, 2007 10:48 PM UTC

Hey...I am no expert on graphics, but having experienced this with other vendor controls, I would surmize that the grid "flickers" because it is forcing a refresh - redraw of everything. Of course it will "flicker" some as it repaints. This will also depend heavily on the type of video card you have and the processor. I have also found that it can depend on the resolution as well as refresh rate.

If it matters any...I cannot reproduce this problem on my computer, but I have experienced this exact same problem on a test computer that has an older video card and the grid is maximized with lots of rows displaying. The problem was not noticable on the test computer when there were just a few rows.

But maybe one of the wizards at Sync can correct me if I am wrong...but I would encourage you to test this out with just a few rows showing and maybe on a new computer with a new video card (make sure your monitor display has the correct driver also - and not just the default) :)


RB Richard Bysouth June 21, 2007 04:56 AM UTC

Did you ever manage to solve this issue? I'm having similar problems and am finding that using Begin/EndUpdate can actually cause worse display problems than just flickering. Seems that hiding rows and columns works best without using Begin/EndUpdate


HA haneefm Syncfusion Team June 21, 2007 11:23 PM UTC

Hi Richard,

To get a better performance when hidding/showing the large number of rows, you need to use the grid virtually. There is a sample in this forumn thread that you can check in this regard. Below is the address if it.

http://www.syncfusion.com/support/forums/message.aspx?&MessageID=6597

You should also take a look at the VirtTreeGrid sample, as this uses the sample technique to dynamically show/hide blocks of rows. The idea is to have an array list of visible rowindexes, and then use this array list virtually to display the visible rows.The virtual technique works better in this case.

Another way to do this would be to have an extra column in your DataTable say ‘HideStatus’ to keep track of the hidden rows. You can initially set the value to be false and apply filter from Grid to show the records that satisfy the false criteria. So whenever you need to hide a row, you just need to set the bool value of that Row field to true. This will be very faster.

Please refer this sample for the implementation:
GGCHideRows

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon