How can I change the order of columns when I export RadGridView data into Excel? Please advise. Thanks.
3 Answers, 1 is accepted
0
Vanya Pavlova
Telerik team
answered on 03 Jun 2011, 07:42 AM
Hi Boris,
You may use the DisplayIndex property of a column to achieve your goal.
Kind regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
The DisplayIndex property will change the order of columns in the GridView itself. I am looking for some command on changing the columns order in export stream, but not in the Grid itself.
Thanks.
0
Vanya Pavlova
Telerik team
answered on 05 Jun 2011, 06:54 PM
Hi Boris,
There is no such built in command that will allow you to change the order of a column in such way.
You may use the Element_Exported event of RadGridView to write directly to the stream. There you may change the order of the columns using the DisplayIndex property of a column.
Greetings,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items