ASPxGridView.AutoFilterCellEditorCreate Event
Assigns editors to individual filter row cells.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v26.1.dll
Declaration
Event Data
The AutoFilterCellEditorCreate event's data class is ASPxGridViewEditorCreateEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Column | Gets the data column to which the processed filter row cell corresponds. |
| EditorProperties | Gets or sets the filter cell’s editor. Inherited from ASPxGridEditorCreateEventArgs. |
| KeyValue | Gets the row key value - an object that uniquely identifies the row. |
| Value | Gets or sets the filter cell’s value. Inherited from ASPxGridEditorCreateEventArgs. |
| VisibleIndex | Gets the row’s visible index. |
Remarks
The AutoFilterCellEditorCreate event fires for each filter row cell and allows you to replace the default cell editor with a custom editor.
You can use the following event argument properties:
- Column
- Returns the column that owns the processed cell.
- EditorProperties
- Specifies the cell editor.
- KeyValue
- Returns the row key value (unique identifier).
- Value
- Specifies the cell value.
- VisibleIndex
- Returns the row visible index.
Note
Do not handle the AutoFilterCellEditorCreate event to modify default editor settings. These changes also affect the edit form, edit row, and edit cell editors of the same type. To customize the predefined editor’s settings, handle the AutoFilterCellEditorInitialize event.
Example
The following code snippet replaces the default DateTime editor with a text editor in the BirthDate column’s filter row cell:
using DevExpress.Web.ASPxEditors;
protected void ASPxGridView1_AutoFilterCellEditorCreate(object sender,
ASPxGridViewEditorCreateEventArgs e) {
if (e.Column == ASPxGridView1.Columns["BirthDate"])
e.EditorProperties = new TextBoxProperties();
}
For additional information, refer to the following help topic: Filtering.