Ticket Q109328
Visible to All Users

ASPxGridView - Change default value of Filter Row condition

created 17 years ago

I want my project to use AutoFilterCondition=Contains
The default value I belevie is BeginsWith. Can I make this change to web.config so I do not have to do it on every column/page

Comments (1)
Bogdan Kharchenko (DevExpress) 17 years ago

    Hi Amjed,
    Sorry, but this isn't possible. However, you can use the following code to implement the required behavior:
    protected void Page_Load(object sender, EventArgs e) {
        if (!IsPostBack)
            foreach (GridViewColumn col in ASPxGridView1.Columns)
                if (col is GridViewDataColumn)
                    ((GridViewDataColumn)col).Settings.AutoFilterCondition = AutoFilterCondition.Contains;
    }
    Thanks,
    Nathan

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.