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

Get column header height of GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

77570 Nov 6,2008 10:19 AM Nov 6,2008 02:58 PM Windows Forms 1
loading
Tags: GridControl
Stefan Busch
Asked On November 6, 2008 10:19 AM

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



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

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


CONFIRMATION

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.

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.

;