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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Querying grid row heights

Thread ID:





21584 Nov 15,2004 02:50 PM UTC Nov 15,2004 07:04 PM UTC WinForms 2
Tags: GridControl
Gordon Rhea
Asked On November 15, 2004 02:50 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

Gordon Rhea
Replied On November 15, 2004 07:04 PM UTC

That got it. Thanks Clay Gordon


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon