I''m trying to get the row height value for every row in a grid. I''ve been using the grid.model.rowheights.getsize(...) method, but I''m running into a situation where it returns the height of the first row then returns -1 for the other rows in the grid. How can I get this to return a correct value for each row, or is there something else I should be using to get the row heights?
ADAdministrator Syncfusion Team November 15, 2004 11:35 AM
Try using an indexer on the RowHeights.
int h = this.grid.Mode.RowHeights[someRowIndex];
dim h as integer = Me.grid.Mode.RowHeights(someRowIndex);
The minus 1 returned by getsize indicates default size being used. The grid does not really allocate the size value until you explicitly set it. Other wise, things just have teh default value. The indexer knows to return this default value but teh getsize method just returns the -1 indicating it really ahsn''t been explicitly set.