6 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 18 Oct 2012, 04:18 AM
Hi,
Try the following javascript to set header text from client side.
JS:
Thanks,
Shinu.
Try the following javascript to set header text from client side.
JS:
function
OnColumnCreated(sender, args)
{
var
column = args.get_column();
switch
(column.get_uniqueName())
{
case
"EmployeeID"
:
column.get_element().innerHTML =
"your text"
;
//setting new HeaderText
break
;
}
}
Thanks,
Shinu.
0
Hello Ted,
If you need to do this outside of any RadGrid's event just go the way shinu has pointed and get a reference to the column's dom element as follows: $find("<%= RadGrid1.ClientID %>).get_masterTableView().getColumnByUniqueName("your column's uniquename goes here").get_element().
Hope it helps.
Regards,
Tsvetoslav
the Telerik team
If you need to do this outside of any RadGrid's event just go the way shinu has pointed and get a reference to the column's dom element as follows: $find("<%= RadGrid1.ClientID %>).get_masterTableView().getColumnByUniqueName("your column's uniquename goes here").get_element().
Hope it helps.
Regards,
Tsvetoslav
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
Alexander
Top achievements
Rank 1
answered on 02 Jul 2013, 03:01 PM
But what to do with export? I need the same changed name (not an original one!) was in the exported PDF/Excel file!
0
Hi Alexander,
Here is the solution:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-excel-export-column-header-always-centered.aspx
Regards,
Tsvetoslav
Telerik
Here is the solution:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-excel-export-column-header-always-centered.aspx
Regards,
Tsvetoslav
Telerik
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 the blog feed now.
0
Alexander
Top achievements
Rank 1
answered on 16 Jul 2013, 08:45 AM
Hi,
you mean
contains the actual markup, with changes made by javascript?
But by this moment, I already changed my code to "postback" the page and change the header's title on server-side...
you mean
e.ExportOutput
contains the actual markup, with changes made by javascript?
But by this moment, I already changed my code to "postback" the page and change the header's title on server-side...
0
Hello Alexander,
The e.ExportOutput contains all the data which will be saved to the file. This means that if something is not there, it won't be exported.
Regards,
Daniel
Telerik
The e.ExportOutput contains all the data which will be saved to the file. This means that if something is not there, it won't be exported.
Regards,
Daniel
Telerik
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 the blog feed now.