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

Hide parent header in Radgrid

1 Answer 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bharat
Top achievements
Rank 1
Bharat asked on 17 Nov 2010, 11:41 AM
Hi all,


I am using data relation in radgrid. Autogenerated column = true

I want ot hide the parent header.
Kindly advise.


I am in hurry !!!


Bharat Rathore

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 22 Nov 2010, 04:00 PM
Hello Bharat,

You can set a Name property for the table view which you want to hide the header of and then wire the ItemCommand event of RadGrid using the following code:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridBoundColumn && e.Item.OwnerTableView.Name=="Name")
    {
         
    }
    if (e.Item is GridHeaderItem)
    {
        (e.Item as GridHeaderItem).Display = false;
    }
}


Sincerely yours,
Tsvetina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
Bharat
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or