Browse by category:
|| | ||
Grid behaves strangely when there are a large number of hidden rows.
In Objective Grid hiding rows and columns is implemented in a way that when the user hides rows, these rows will be marked as hidden. However, the hidden row will still be treated as a regular row when it comes to scrolling or drawing the grid. So, when you scroll over a large amount of hidden rows you will realize that the scrollbar jumps. Also, if you show a grid with many hidden rows, you will recognize that drawing will slow down with the number of hidden rows.
We have provided a sample (see attachment below) that implements a different technique for hidden rows. The grid is made to draw the actual number of rows less the hidden rows (by overriding GetRowCount()), though the grid stores the actual number of rows in its CGXData object. This results in each visible row representing a different original row in the grid's data depending on the number of hidden rows above it. The sample maintains a mapping of the visible row to the actual row and provides this mapping when the grid "Gets" or "Stores" styles by overriding GetStyleRowCol() and StoreStyleRowCol().
|hiderow.zip (64 kb)|
|Objective Grid: Removing borders and grid lines from cells||Objective Grid: Turning off row headers|