Skip to main content
Tab

ASPxGridViewSearchPanelSettings.ColumnNames Property

Specifies the columns to which the grid should apply the search panel filter.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("*")]
public string ColumnNames { get; set; }

Property Value

Type Default Description
String "*"

A string value listing grid column identifiers that can be either: column name, field name, or caption.

Property Paths

You can access this nested property as listed below:

Object Type Path to ColumnNames
ASPxGridView
.SettingsSearchPanel .ColumnNames
GridViewProperties
.SettingsSearchPanel .ColumnNames

Remarks

Use the ColumnNames property to specify columns to which the grid should apply the search panel filter. The specified strings can be either: a column name (WebColumnBase.Name), field name (GridViewDataColumn.FieldName), or caption(WebColumnBase.Caption).

You can exclude a particular column from the filter by setting the column’s GridDataColumnSettings.AllowFilterBySearchPanel property to false.

Web Forms:

<dx:ASPxGridView ID="Grid" runat="server" DataSourceID="GridDataSource">
    <Columns>
        <dx:GridViewDataTextColumn FieldName="Country">
            <Settings AllowFilterBySearchPanel="false" />
        </dx:GridViewDataTextColumn>
        ...
    </Columns>
    <SettingsSearchPanel Visible="true" />
</dx:ASPxGridView>

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "grid";
    settings.Columns.Add(column => {
        column.FieldName = "Country";
        column.Settings.AllowFilterBySearchPanel = DefaultBoolean.False;
    });
    settings.SettingsSearchPanel.Visible = true;
    ...
}).Bind(Model).GetHtml()

Concept

Online Demos

Example

SearchPanel_ColumnName

Web Forms:

<dx:ASPxGridView ID="Grid" runat="server">
    <SettingsSearchPanel Visible="true" ShowApplyButton="True" ShowClearButton="True"
        ColumnNames="ContactName; CompanyName" />
    <%--...--%>
</dx:ASPxGridView>

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "grid";
    settings.SettingsSearchPanel.Visible = true;
    settings.SettingsSearchPanel.ShowApplyButton = true;
    settings.SettingsSearchPanel.ShowClearButton = true;
    settings.SettingsSearchPanel.ColumnNames = "ContactName; CompanyName";
    ...
}).Bind(Model).GetHtml()
See Also