Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    QueryIsSearchColumnEventArgs Class

    Namespace: DevExpress.XtraEditors

    Assembly: DevExpress.XtraEditors.v25.1.dll

    NuGet Package: DevExpress.Win.Navigation

    #Declaration

    public class QueryIsSearchColumnEventArgs :
        EventArgs

    #Remarks

    The SearchControl searches through all columns in the attached control (see RepositoryItemSearchControl.Client).

    SearchControl_InGrid

    The QueryIsSearchColumn event allows you to specify whether or not to search in a specific column. The control raises this event for each column in the attached control. Read the Caption event argument to obtain the processed column’s caption. You can also use the FieldName and DataType arguments to obtain the processed field’s name and data type. If the SearchControl should not be permitted to search in the processed column, set the IsSearchColumn event argument to false.

    The SearchControl.QueryIsSearchColumn and RepositoryItemSearchControl.QueryIsSearchColumn (see SearchControl.Properties) events are equivalent.

    #Example

    The code below shows how to search in the Ship Country column only.

    SearchControl_InGridQuery

    using DevExpress.XtraEditors;
    
    private void searchControl1_QueryIsSearchColumn(object sender, QueryIsSearchColumnEventArgs args) {
        if (args.FieldName != "ShipCountry")
            args.IsSearchColumn = false;    
    }
    

    #Inheritance

    Object
    EventArgs
    QueryIsSearchColumnEventArgs
    See Also