I have a grid with filtering, sorting, paging enabled. I added Excel export to it as well. Once data is loaded, Excel export works like a charm, however, I have an issue with exporting filtered grid. I apply a filter to column, then when I click Export button, CommandRow disappears, all the filter controls disappear, and that's it, no export.
My grid
<telerik:RadGrid ID=
"RadGridOpenCases"
runat=
"server"
AutoGenerateColumns=
"False"
DataSourceID=
"odsOpenCases"
AllowPaging=
"True"
PageSize=
"10"
AllowSorting=
"True"
AllowFilteringByColumn=
"true"
Skin=
"Bootstrap"
>
<ExportSettings ExportOnlyData=
"true"
IgnorePaging=
"true"
></ExportSettings>
<MasterTableView CellSpacing=
"-1"
DataKeyNames=
"CaseID"
DataSourceID=
"odsOpenCases"
EnableNoRecordsTemplate=
"True"
AllowFilteringByColumn=
"True"
CommandItemDisplay=
"Top"
>
<CommandItemSettings ShowExportToExcelButton=
"true"
ShowAddNewRecordButton=
"false"
ShowRefreshButton=
"false"
/>
<Columns>
<telerik:GridBoundColumn DataField=
"casenumber"
HeaderText=
"Case #"
SortExpression=
"casenumber"
UniqueName=
"casenumber"
ItemStyle-Wrap=
"false"
AutoPostBackOnFilter=
"true"
ShowFilterIcon=
"false"
/>
<telerik:GridBoundColumn DataField=
"subject"
HeaderText=
"Case Name"
SortExpression=
"subject"
UniqueName=
"subject"
AutoPostBackOnFilter=
"true"
ShowFilterIcon=
"false"
/>
<telerik:GridDateTimeColumn DataField=
"datereceived"
HeaderText=
"Received"
SortExpression=
"datereceived"
PickerType=
"DatePicker"
EnableTimeIndependentFiltering=
"true"
DataFormatString=
"{0:MM/dd/yyyy}"
/>
<telerik:GridBoundColumn DataField=
"subdivisiondesc"
HeaderText=
"Type"
SortExpression=
"subdivisiondesc"
UniqueName=
"subdivisiondesc"
AutoPostBackOnFilter=
"true"
ShowFilterIcon=
"false"
/>
<telerik:GridBoundColumn DataField=
"categorydesc"
HeaderText=
"Category"
SortExpression=
"categorydesc"
UniqueName=
"categorydesc"
AutoPostBackOnFilter=
"true"
ShowFilterIcon=
"false"
/>
<telerik:GridBoundColumn DataField=
"subcategorydesc"
HeaderText=
"SubCategory"
SortExpression=
"subcategorydesc"
UniqueName=
"subcategorydesc"
AutoPostBackOnFilter=
"true"
ShowFilterIcon=
"false"
/>
<telerik:GridBoundColumn DataField=
"assignedto"
HeaderText=
"Assigned To"
SortExpression=
"assignedto"
UniqueName=
"assignedto"
AutoPostBackOnFilter=
"true"
ShowFilterIcon=
"false"
/>
<telerik:GridBoundColumn DataField=
"casedoccount"
HeaderText=
""
SortExpression=
"casedoccount"
UniqueName=
"casedoccountid"
AllowFiltering=
"false"
/>
</Columns>
<NoRecordsTemplate>
<p style=
"padding: 20px;"
>No cases to display</p>
</NoRecordsTemplate>
</MasterTableView>
<GroupingSettings CaseSensitive=
"false"
/>
<ClientSettings EnableRowHoverStyle=
"true"
EnablePostBackOnRowClick=
"true"
>
<Selecting AllowRowSelect=
"True"
/>
</ClientSettings>
</telerik:RadGrid>
My code-behind
Protected
Sub
RadGridOpenCases_ItemCommand(
ByVal
sender
As
Object
,
ByVal
e
As
GridCommandEventArgs)
Handles
RadGridOpenCases.ItemCommand
If
e.CommandName = RadGrid.ExportToExcelCommandName
Then
RadGridOpenCases.ExportSettings.Excel.Format = GridExcelExportFormat.Biff
RadGridOpenCases.ExportSettings.IgnorePaging =
True
RadGridOpenCases.ExportSettings.ExportOnlyData =
True
RadGridOpenCases.ExportSettings.OpenInNewWindow =
True
RadGridOpenCases.ExportSettings.FileName =
"Dashboard"
End
If
End
Sub