3 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 18 Feb 2009, 05:58 AM
Hello Charles,
I hope you are trying to export additional columns from the datasource of the grid. If so, you can hide the columns by setting its Visible property to false and setting the columns visibility to true on exporting(button click). To understand better, try out the code below:
aspx:
cs:
Thanks
Princy.
I hope you are trying to export additional columns from the datasource of the grid. If so, you can hide the columns by setting its Visible property to false and setting the columns visibility to true on exporting(button click). To understand better, try out the code below:
aspx:
<telerik:GridBoundColumn Visible="false" ReadOnly="true" DataField="FirstName" HeaderText="FirstName" UniqueName="FirstName"></telerik:GridBoundColumn> |
cs:
protected void ExportBtn_Click(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.GetColumnSafe("FirstName").Visible = true; |
RadGrid1.ExportSettings.IgnorePaging = true; |
RadGrid1.ExportSettings.ExportOnlyData = true; |
RadGrid1.ExportSettings.OpenInNewWindow = true; |
RadGrid1.MasterTableView.ExportToExcel(); |
} |
Thanks
Princy.
0

Charles
Top achievements
Rank 1
answered on 18 Feb 2009, 01:52 PM
Thanks Princy appreciate it. works great!
0

Shinu
Top achievements
Rank 2
answered on 19 Feb 2009, 04:03 AM
Hi Charles,
You can also refer the following help article which gives tips and tricks while exporting.
Exporting tips and tricks
Thanks
Shinu
You can also refer the following help article which gives tips and tricks while exporting.
Exporting tips and tricks
Thanks
Shinu