Auto-Generated Editors
Editable columns inside a RadGrid control supply a default editor that enables users to edit the values in the column. The editor is specified by the ColumnEditor property of the column, which is of type IGridColumnEditor.
Editable columns are columns that implement the IGridEditableColumn interface.
Default Column Editors
The following table lists the default column editors for each of the built-in editable column types:
Column type | Default column editor | Column editor base class |
---|---|---|
GridBoundColumn | GridTextBoxColumnEditor | GridTextColumnEditor |
GridDropDownColumn | GridDropDownListColumnEditor | GridDropDownColumnEditor |
GridCheckBoxColumn | GridCheckBoxListColumnEditor | GridBoolColumnEditor |
GridDateTimeColumn | GridDateTimeColumnEditor | GridTextColumnEditor |
GridNumericColumn | GridNumericColumnEditor | GridTextColumnEditor |
GridMaskedColumn | GridMaskedColumnEditor | GridTextColumnEditor |
GridHTMLEditorColumn | GridHTMLEditorColumnEditor | GridTextColumnEditor |
GridTemplateColumn | GridTemplateColumnEditor | GridColumnEditorBase |
GridBinaryImageColumn | GridBinaryImageColumnEditor | GridColumnEditorBase |
The purpose of column editors is to define the style of the controls in edit mode. Note that using column editors for modifying the functionality of the edit controls is not recommended.
If you want to change properties of a
GridDateTimeColumn
editor related to the calendar or time view, use theirSharedCalendar
orSharedTimeView
properties.
Accessing the column editors programmatically
The autogenerated column editor is available when the item is in edit mode.
<MasterTableView ...>
<Columns>
<telerik:GridNumericColumn UniqueName="MyNumericColumn" DataField="ItemNumber" ... />
</Columns>
</MasterTableView>
Custom column editors
You can replace the default column editor with a custom editor. By supplying a custom column editor, you can provide a column with enhanced functionality such as validation, rich-text editing, third-party controls, and so on.
Once created, you can easily re-use your custom column editors for other grid implementations.