The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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.