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

Export template column

1 Answer 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lasly
Top achievements
Rank 1
Lasly asked on 04 Nov 2011, 10:36 AM
Hi,
I have RadGrid with a templatecolumn with RadCheckbox, when I'm going to export the data, my RadGrid catches Exception in own ItemDataBound event, I'm going to check if e.Item.FindControl("mycheckbox") method returns null.
But when I open Excel I don't find the Column with checkbox.

Regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 04 Nov 2011, 10:46 AM
Hello Lasly,

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

Thanks,
Shinu.
Tags
Grid
Asked by
Lasly
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or