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

Rad grid export for only particular column

2 Answers 261 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
phani
Top achievements
Rank 1
phani asked on 20 May 2011, 03:40 PM
Hi,
 i  am displaying data in a rad grid,
i want to provide export option for only 4 columns of grid  out of 6.
can any one help me in this please.............

Thank you,
phani

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 May 2011, 05:02 AM
Hello Phani,

You can hide the desired column by setting the Visible property of the ColumnElement to false.

C#:
protected void button1_Click(object sender, EventArgs e)
{
    RadGrid1.MasterTableView.GetColumn("ColumnUniqueName").Visible = false;
    RadGrid1.MasterTableView.ExportToExcel();
}

Another approach is to remove the column element and relevant cells.
ExcelML structure / GridExcelBuilder.

Thanks,
Shinu.
0
phani
Top achievements
Rank 1
answered on 23 May 2011, 02:26 PM
thank you  shinu....
Tags
General Discussions
Asked by
phani
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
phani
Top achievements
Rank 1
Share this question
or