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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get column header height of GridDataBoundGrid

Thread ID:





77570 Nov 6,2008 03:19 PM UTC Nov 6,2008 07:58 PM UTC WinForms 1
Tags: GridControl
Stefan Busch
Asked On November 6, 2008 03:19 PM UTC

Hi there,

is there a way to receive the height of the column header row in a GridDataBoundGrid?

- or (what would be much better)
is there a way to receive the whole height of the grid?

I tried to receive the height of the grid using the following lines (PseudoCode may not work):

GridDataBoundGrid testGrid;
testGrid.Model.RowHeights.GetTotal(0, testGrid.Model.RowCount);

But the rowcount info only hands the rows except the header back, so i am missing the information on the height of the header.

Could you help me?

Thanks in advance,

Nirmal Raja [Syncfusion]
Replied On November 6, 2008 07:58 PM UTC

Hi Stefan,

Thank you for your interest in Syncfusion products.

The zero index row of the GridDataBoundGrid is always the Row header.
The row count will always be less the one of the last index as it starts from zero.
In your code the GetTotal parametre start from zero, that is row header and ends before the last row
and the total height will be less than one, so the last index should be given as the row count plus one.

Please refer the code below to retrieve the height of the row header:
GridDataBoundGrid testGrid;

Please refer the code below to retrieve the height of whole Grid table:
GridDataBoundGrid testGrid;
testGrid.Model.RowHeights.GetTotal(0, gridDataBoundGrid1.Model.RowCount+1)

Let me know if you have any queries.



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