I recently created a custom drop down filter for use in a RadGrid. I followed the example from these two links:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx
http://www.telerik.com/help/aspnet/grid/grdfilteringwithdropdownlist.html
The grid shows a list of sites. The drop down displays a list of statuses that can pertain to requests belonging to the site. See attached screen shot. The column displays a count showing how many of that site's requests have the selected status.
The grid has an ExportToExcel button. When clicking that button, the custom control throws the following exception:
The error occurs in this method on the last line where it adds the combox to the list of controls in the cell..
protected override void SetupFilterControls(TableCell cell)
{
rcBox = new RadComboBox();
rcBox.ID = ID;
rcBox.AutoPostBack = true;
rcBox.Width = FilterControlWidth;
rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
rcBox.DataSource = StatusList;
cell.Controls.Add(rcBox);
}
How do I get the export to work? Why is this causing the export to fail?
Thank you.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx
http://www.telerik.com/help/aspnet/grid/grdfilteringwithdropdownlist.html
The grid shows a list of sites. The drop down displays a list of statuses that can pertain to requests belonging to the site. See attached screen shot. The column displays a count showing how many of that site's requests have the selected status.
The grid has an ExportToExcel button. When clicking that button, the custom control throws the following exception:
| 2013-04-26
10:01:37.923,0000000F,OPSWeb,Unhandled Application Exception [Page Info:
/OPSWeb/OPSMain.aspx],Error,Unable to cast object of type
'Telerik.Web.UI.CompressedPageState' to type
'System.Collections.IDictionary'. |
10:21 |
The error occurs in this method on the last line where it adds the combox to the list of controls in the cell..
protected override void SetupFilterControls(TableCell cell)
{
rcBox = new RadComboBox();
rcBox.ID = ID;
rcBox.AutoPostBack = true;
rcBox.Width = FilterControlWidth;
rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
rcBox.DataSource = StatusList;
cell.Controls.Add(rcBox);
}
Thank you.