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

[Solved] Changing column header text in Header context Menu

2 Answers 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ugo
Top achievements
Rank 1
ugo asked on 05 Mar 2013, 10:06 AM
Please how do i chane my column Header from Datasource Column name to my Custom Column name  when i want to hide or show columns using header context menu.My Radgrid header is showing custom name but the header custom menu is showing Datasource column name

2 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 08 Mar 2013, 11:44 AM
Hello Ugo,

You can use the approaches provided in the following topic:
http://www.telerik.com/help/aspnet-ajax/grid-header-context-menu.html

Hope this helps.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Shinu
Top achievements
Rank 2
answered on 11 Mar 2013, 05:03 AM
Hi,

Try the following code to achieve your scenario.
C#:
RadGrid1.HeaderContextMenu.ItemCreated += new Telerik.Web.UI.RadMenuEventHandler(HeaderContextMenu_ItemCreated);
protected void HeaderContextMenu_ItemCreated(object sender, Telerik.Web.UI.RadMenuEventArgs e)
{
    if(e.Item.Value=="text")
    {
         e.Item.Text = "new text";
    }
}

Thanks,
Shinu.
Tags
Grid
Asked by
ugo
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or