Can anyone tell me how to hide all rows in one go instead of setting them hidden = true one by one through loop?
What's the problem with using a loop?
Another way to do it would be to bind the grid to an empty data source. Or maybe no data source.
Or, you could set a flag and then use the InitializeRow event to hide the row when that flag is set. You would then refresh the rows collection on the grid and force the event to fire like so:
grid.Rows.Refresh(FireInitializeRow)
Another option using a flag would be to use a CreationFilter and prevent the creation of the RowUIElements. This would probably be the most efficient way to do it, but also a bit tricky if you are not experience with CreationFilters and UIElements.
Hi JIJIL,
Nope I did not get any answer from any one. :(
I am still doing this thing through loop.
Hi Shalab,
You got any idea how to clear all the rows.
Thanks,
JIJIL