Hi. I'm using Telerik 2016.3.1027.40. I need to export an Excel spreadsheet in BIFF that includes both the data that appears in a UI table, which Telerik handles, and any table filtering criteria and the filtering option (Contains, StartsWith, EqualTo, Between, etc.) on an additional tab on the worksheet. I can create the additional tab and population it with data. My question is: is it possible to retrieve the filtering option used per column (if any) in the UI in the view's code behind?
<telerik:Radgrid Rendermode="Lightweight" ID="RadGrid1" runat="server" showstatusbar="true" autogeneratecolumns="False" AllowFilteringByColumn="True" pagesize="10" allowsorting="True" allowmultirowselection="False" allowpaging="True" Filtertype="Combined" onneeddatasource="RadGrid1_NeedDataSource" oniteminserted="RadGrid1_ItemInserted" onitemcommand="RadGrid1_ItemCommand" oninsertcommand="RadGrid1_InsertCommand" onupdatecommand="RadGrid1_UpdateCommand" onitemdatabound="RadGrid1_ItemDataBound" ondetailtabledatabind="RadGrid1_DetailTableDataBind" OnDeleteCommand="RadGrid1_DeleteCommand" Skin="Outlook" OnItemCreated="RadGrid1_ItemCreated" ShowExportToExcelButton="true" onBiffExporting="RadGrid1_BiffExporting"> <MasterTableView AutoGenerateColumns="False" UniqueName="CATDESCRIPTION" AllowMultiColumnSorting="True" DataKeyNames="CAT_DESCRIPTION" PagerStyle-AlwaysVisible="true" EditMode="InPlace" CommandItemDisplay="Top"><DetailTables> <telerik:GridTableView DataKeyNames="pk" Name="Codes" TableLayout="Auto" EditMode="InPlace" PagerStyle-AlwaysVisible="true" CommandItemDisplay="Top"> <CommandItemSettings ShowExportToExcelButton="true" /> <CommandItemSettings AddNewRecordText="Add Rule" />Additional code omitted...
and the code behind something like this...
protected void RadGrid1_BiffExporting(object o, GridBiffExportingEventArgs e) { Telerik.Web.UI.ExportInfrastructure.Table newSheet1 = new Telerik.Web.UI.ExportInfrastructure.Table("Metadata"); // Get filtering options here... // Add filtering options to newSheet1 in new cells...
e.ExportStructure.Tables.Add(newSheet1);}