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

Radgrid Export Excel Solution

1 Answer 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
nagendra
Top achievements
Rank 1
nagendra asked on 19 Nov 2011, 05:27 PM
Hi All,

How to Export  only the template column with label field and bound column and visible column in radgrid into excel.
we want HeaderText of radgrid column name as Column name in Excel how to get that..
please give the valuable solution for this.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Nov 2011, 05:21 AM
Hello Nagendra,

Try the following code snippet.
C#:
protected void Export_Click(object sender, EventArgs e)
{
  RadGrid1.MasterTableView.GetColumn("TemplateColumn").Visible = true;
  RadGrid1.MasterTableView.ExportToExcel();
  RadGrid1.MasterTableView.Rebind();
}

-Shinu.
Tags
General Discussions
Asked by
nagendra
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or