[置顶] Ext.Net 1.x_Ext.Net.GridPanel之Filters 过滤数据

 直接上代码吧:仿照DEMO不解释

前台:

<LoadMask ShowMask="true" />
                      <Plugins>
                    <ext:GridFilters runat="server" ID="GridFilters1" Local="true">
                        <Filters>
                            <ext:StringFilter  DataIndex="材料类型" />
                            <ext:StringFilter  DataIndex="供应商" />
                        </Filters>
                    </ext:GridFilters>
                </Plugins>

 

            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="120" StoreID="Store1" >
                       <Items>
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
                            <ext:Button ID="Button1" runat="server" Text="">
                                <DirectEvents>
                                    <Click OnEvent="SetFilter" />
                                </DirectEvents>
                            </ext:Button>
                        </Items>
            </ext:PagingToolbar>

后台方法:

    protected void SetFilter(object sender, DirectEventArgs e)
    {
        StringFilter sf = (StringFilter)GridFilters1.Filters[1];
        //sf.SetValue("");
        sf.SetActive(true);
    }

上图:

[置顶] Ext.Net 1.x_Ext.Net.GridPanel之Filters 过滤数据_第1张图片


你可能感兴趣的:(object,server,ext,button,plugins)