This is a migrated thread and some comments may be shown as answers.

GetActucalHeight of columnheaders of a child template

1 Answer 10 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Deepak
Top achievements
Rank 1
Deepak asked on 24 May 2011, 01:41 PM
How do I get the actualheight of columnheaders of a child template?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 25 May 2011, 04:49 PM
Hi Deepak,

Thank you for writing.

You can access the header height of a child template, by accessing the TableHeaderHeight property of the Template's TableElement. Here is an example of this:
int headerHeight;
void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    if (e.CellElement.ViewTemplate == radGridView1.MasterTemplate.Templates[0])
    {
        GridHeaderCellElement headerCell = e.CellElement as GridHeaderCellElement;
        if (headerCell != null)
        {
             headerHeight = headerCell.TableElement.TableHeaderHeight;
        }
    }
}

I hope you find this information useful. Should you have any other questions, do not hesitate to contact us.
 
Regards,
Stefan
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
Deepak
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or