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

Rename columns on export

2 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andreas N.
Top achievements
Rank 2
Andreas N. asked on 16 Mar 2009, 02:34 PM
Hi,

how can I rename the columns when exporting the grid content?

Thank you

Andreas

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 17 Mar 2009, 04:48 AM
Hi,

Try accessing the column using its UniqueName property and reset it in the Export button click using the following code snippet

 RadGrid1.MasterTableView.Columns.FindByUniqueName( "Country").HeaderText="MyHeader";

Thanks,
Princy
0
Andreas N.
Top achievements
Rank 2
answered on 26 Mar 2009, 01:06 PM
Hi,

to add for someone else, who is eventually looking at this thread, there are different collections of columns - I wasn't aware of - to enumerate

e.g.
MasterTableView.Columns;
MasterTableView.RenderColumns;
MasterTableView..AutoGeneratedColumns (which I needed as my columns were autogenerated).

regards

Andreas
Tags
Grid
Asked by
Andreas N.
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Andreas N.
Top achievements
Rank 2
Share this question
or