GridCustomizeFilterRowEditorEventArgs.FieldName Property
Returns a name of a data field whose editor is being processed.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public string FieldName { get; }
Property Value
Type | Description |
---|---|
String | The data field’s name. |
Remarks
Handle the CustomizeFilterRowEditor event to customize filter row editors separately from data row editors. The following example hides clear buttons in all editors in the filter row:
<DxGrid Data="GridData"
ShowFilterRow="true"
CustomizeFilterRowEditor="Grid_CustomizeFilterRowEditor">
<Columns>
<DxGridDataColumn FieldName="OrderId" Caption="Order ID" DisplayFormat="d" SortIndex="0" MinWidth="100" Width="10%" />
<DxGridDataColumn FieldName="OrderDate" DisplayFormat="d" MinWidth="120" Width="10%" />
<DxGridDataColumn FieldName="ProductName" FilterRowValue='"Queso"' FilterRowOperatorType="GridFilterRowOperatorType.Contains" MinWidth="100" />
<DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c2" MinWidth="150" Width="10%">
<FilterRowCellTemplate>
<DxComboBox @bind-Value="context.FilterCriteria"
Data="UnitPriceIntervals" ValueFieldName="Criteria" TextFieldName="DisplayText"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto" />
</FilterRowCellTemplate>
</DxGridDataColumn>
<DxGridDataColumn FieldName="CustomerId" Caption="Customer" MinWidth="120">
<EditSettings>
<DxComboBoxSettings Data="Customers" ValueFieldName="CustomerId" TextFieldName="DisplayText" FilteringMode="DataGridFilteringMode.Contains" />
</EditSettings>
</DxGridDataColumn>
<DxGridDataColumn FieldName="Shipped" UnboundType="GridUnboundColumnType.Boolean" UnboundExpression="[ShippedDate] <> Null" Width="5%" MinWidth="100" />
<DxGridCommandColumn Width="80px" NewButtonVisible="false" EditButtonVisible="false" DeleteButtonVisible="false" />
</Columns>
</DxGrid>
@code {
// ...
void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) {
if(e.EditSettings is ITextEditSettings settings)
settings.ClearButtonDisplayMode = DataEditorClearButtonDisplayMode.Never;
}
}
See Also