Devexpress Gridview Filter Control

user1805523 picture user1805523 · Nov 7, 2012 · Viewed 9.5k times · Source

I have a ASPxGridView component that is filled from a SQL query I wanted to apply a filter on my ASPX Gridview so I wrote:

<dx:ASPxGridView runat="server" ID="gvExecReq" Visible="false" AutoGenerateColumns="true"
        OnPageIndexChanged="gvExecReq_PageIndexChanged" OnBeforeColumnSortingGrouping="gvExecReq_BeforeColumnSortingGrouping">
        **<Settings ShowFilterRow="True" />
        <Settings ShowFilterBar="Visible" ShowHeaderFilterButton="True" />**
    </dx:ASPxGridView>

the filter is well established, but it is not functional What do I need to add more?

Answer

Ruchi picture Ruchi · Nov 13, 2012

Please Use Following Settings For Filter To Be Operational :

     <Settings ShowHeaderFilterButton="true"
     EnableFilterControlPopupMenuScrolling="True"
     ShowFilterBar="Visible" ShowFilterRow="True" ShowFilterRowMenu="True" />

Also In The Columns of The Grid You Can Control The Condition of Filtering i.e. Contains, Equal, Does Not Contain etc.

  <dx:GridViewDataColumn  Settings-AutoFilterCondition="Contains" Settings-FilterMode="DisplayText">