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

export all columns of a radgrid

2 Answers 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gilberto
Top achievements
Rank 1
Gilberto asked on 10 Sep 2012, 05:55 PM
Hello

Can i use the exporting built in radgrid to export all columns even if the collumn is display = false?

best regards

gilberto

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 10 Sep 2012, 07:36 PM
Hello,

protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToExcelCommandName ||
                e.CommandName == Telerik.Web.UI.RadGrid.ExportToWordCommandName ||
                e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName)
            {
                ConfigureExport();
            }
        }
      
        public void ConfigureExport()
        {
                                radGrid1.MasterTableView.Columns.FindByUniqueName("YOURCOLUMNUNIQUENAME").Display = true;
 
        }


Thanks,
Jayesh Goyani
0
Gilberto
Top achievements
Rank 1
answered on 11 Sep 2012, 02:36 PM
Thanks, it works
Tags
Grid
Asked by
Gilberto
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Gilberto
Top achievements
Rank 1
Share this question
or