Order of columns when exporting to Excel

4 posts, 0 answers
  1. bkagan98
    bkagan98 avatar
    16 posts
    Member since:
    Feb 2011

    Posted 02 Jun 2011 Link to this post

    How can I change the order of columns when I export RadGridView data into Excel? Please advise. Thanks.
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 03 Jun 2011 Link to this post

    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
  3. DevCraft banner
  4. bkagan98
    bkagan98 avatar
    16 posts
    Member since:
    Feb 2011

    Posted 03 Jun 2011 Link to this post

    Hi Vanya,

    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.
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 05 Jun 2011 Link to this post

    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
Back to Top