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

Querying grid row heights

Hi, 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? Thanks, Gordon

2 Replies

AD Administrator Syncfusion Team November 15, 2004 04:35 PM UTC

Try using an indexer on the RowHeights. //C# int h = this.grid.Mode.RowHeights[someRowIndex]; ''VB 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.

GR Gordon Rhea November 15, 2004 07:04 PM UTC

That got it. Thanks Clay Gordon

Live Chat Icon For mobile
Up arrow icon