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
close icon

Get column header height of GridDataBoundGrid

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,
Stefan



1 Reply

NR Nirmal Raja Syncfusion Team 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;
testGrid.Model.RowHeights[0];

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.

Regards,
Nirmal


Loader.
Live Chat Icon For mobile
Up arrow icon