Export selective columns

2 posts, 0 answers
  1. Johan
    Johan avatar
    1 posts
    Member since:
    Oct 2011

    Posted 10 Dec 2014 Link to this post


    My RadTreeList has seven columns and I have added functionality to Export the treelist to Excel. How can I exclude a column for being exported, i.e. I have columnA, columnB, columnC, columnD, columnE, columnF, and columnG but when exporting, I do not want columnF to be exported.

    Is this possible? If yes, sample code would be appreciated
  2. Angel Petrov
    Angel Petrov avatar
    1075 posts

    Posted 15 Dec 2014 Link to this post

    Hi Johan,

    In order to achieve the desired goal you can hide the column before the export is triggered. If you are using an external button to trigger the export you can do something like this.

    protected void Button_Click(object sender, EventArgs e)
            RadTreeList1.GetColumnSafe("columnF").Visible = false;

    Angel Petrov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top