I'm having some trouble with filter menus. When I first load the page, I don't have menus when I click the filter buttons.
I then filter using the CurrentFilterFunction="Contains" setting and pressing <tab>, a postback occurs, and now my filter buttons have the column header menus (Sort Ascending..., Group By, Best fit, etc.)
Any ideas why or what I can do to get and keep the proper filter menus?
C#
ASCX
I then filter using the CurrentFilterFunction="Contains" setting and pressing <tab>, a postback occurs, and now my filter buttons have the column header menus (Sort Ascending..., Group By, Best fit, etc.)
Any ideas why or what I can do to get and keep the proper filter menus?
C#
protected override void OnPreRender(System.EventArgs e){ // ... Control setup unrelated to RadGrid1 // Test filtering bool Filter = true; if (Filter) { RadGrid1.AllowFilteringByColumn = Filter; RadGrid1.MasterTableView.AllowFilteringByColumn = Filter; }}
// I've also got handlers for these, but they don't setup filtering:
RadGrid1.PreRender += RadGrid1_PreRender;
RadGrid1.ItemCreated += RadGrid1_ItemCreated;
RadGrid1.ItemDataBound += RadGrid1_ItemDataBound;
RadGrid1.NeedDataSource += RadGrid1_NeedDataSource;
RadGrid1.GroupsChanging += RadGrid1_GroupsChanging;
ASCX
<telerik:RadGrid EnableViewState="true" ID="RadGrid1" runat="server" AllowSorting="True" AllowPaging="True" GridLines="None" PageSize="25" AutoGenerateColumns = "false" OnExcelMLWorkBookCreated="RadGrid1_ExcelMLWorkBookCreated" OnItemCreated="RadGrid1_ItemCreated" OnHTMLExporting="RadGrid1_HtmlExporting" AllowMultiRowSelection="True" ShowFooter="true" ShowGroupPanel="True" EnableHeaderContextMenu="true" Skin="Xledger" EnableEmbeddedSkins="false" style="z-index: 0;"> <PagerStyle AlwaysVisible="true" /> <ExportSettings IgnorePaging="true" OpenInNewWindow="true"> <Pdf PageHeight="210mm" PageWidth="297mm" DefaultFontFamily="Arial Unicode MS" PageTopMargin="45mm" BorderStyle="Medium" BorderColor="#666666"></Pdf> </ExportSettings> <ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder" AllowDragToGroup="true"> <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True" AllowResizeToFit="true"></Resizing> <Selecting AllowRowSelect="true" /> <Scrolling AllowScroll="false"/><%--<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2"></Scrolling> --%> </ClientSettings> <GroupingSettings ShowUnGroupButton="true" RetainGroupFootersVisibility="true"></GroupingSettings> <MasterTableView ShowGroupFooter="true" TableLayout="Auto" Width="100%" AllowMultiColumnSorting="true" AllowGroupCollapse="true" GroupLoadMode="Client" EnableGroupsExpandAll="true"> <%-- AUTOGROUP BY ACCOUNT GROUP <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldName="t_rv_account_group" /> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="t_rv_account_group" /> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> --%> <Columns> <telerik:GridBoundColumn UniqueName="trvAccountGroup" DataField="t_rv_account_group" DataType="System.String" HeaderText="trvAccountGroup" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"></telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="trvSysAccount" DataField="t_rv_sys_account" DataType="System.String" HeaderText="trvSysAccount"></telerik:GridBoundColumn><%-- ... more columns ... --%> </Columns> </MasterTableView> </telerik:RadGrid>