This is a migrated thread and some comments may be shown as answers.

Filter button has column header menu after postback

1 Answer 32 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Joel asked on 08 Sep 2014, 10:52 PM
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?

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;

<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>
                    <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> --%>
                    <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
                              <telerik:GridGroupByField FieldName="t_rv_account_group" />
                              <telerik:GridGroupByField FieldName="t_rv_account_group" />
                            <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 ... --%>

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 11 Sep 2014, 12:49 PM
Hi Joel,

I prepared a small sample based on the provided code and on my side seems to work correctly. Could you please give it a try and let me know how it differs from your real setup?


Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question