Hi,
I added export to Excel/Word/Pdf to my RadGrid. Export to excel works perfectly, but export to pdf and Word just corrupt my Grid's layout (header and footer aren't displayed anymore). After another postback (e.g. when sorting), the Grid is correctly
displayed.
These are my settings:
I don't have any special logic for excel. This is the only thing I do in the GridItemCommand event handler:
I don't get any server or client-side errors/warnings when exporting, so what could that be?
I added export to Excel/Word/Pdf to my RadGrid. Export to excel works perfectly, but export to pdf and Word just corrupt my Grid's layout (header and footer aren't displayed anymore). After another postback (e.g. when sorting), the Grid is correctly
displayed.
These are my settings:
grid.MasterTableView.CommandItemSettings.ShowExportToExcelButton =
true
;
grid.MasterTableView.CommandItemSettings.ShowExportToPdfButton =
true
;
grid.MasterTableView.CommandItemSettings.ShowExportToWordButton =
true
;
grid.ExportSettings.IgnorePaging =
true
;
grid.ExportSettings.ExportOnlyData =
true
;
grid.ExportSettings.OpenInNewWindow =
true
;
I don't have any special logic for excel. This is the only thing I do in the GridItemCommand event handler:
if
(e.CommandName == RadGrid.ExportToExcelCommandName ||
e.CommandName == RadGrid.ExportToPdfCommandName
|| e.CommandName == RadGrid.ExportToWordCommandName)
{
foreach
(GridColumn column
in
grid.MasterTableView.Columns)
{
if
(!(column
is
GridBoundColumn) && !(column
is
GridCheckBoxColumn))
{
column.Visible =
false
;
}
}
}
I don't get any server or client-side errors/warnings when exporting, so what could that be?