Editors
RadVirtualGrid allows the users to edit the cells values. Usually this process starts by typing in the cell or by pressing F2. By default the editor type is determined according to the data value type. When in edit mode, the user can change the cell value and press Enter to commit the change or Esc to revert to the original value. Clicking outside the edited cell also commits the change.
RadVirtualGrid can be made read-only by setting the AllowEdit property to false. In this case the editors would not appear.
Currently, RadVirtualGrid supports the following editors out of the box:
Editor type | Description | Image |
---|---|---|
VirtualGridCalculatorEditor | Represents a calculator editor | |
VirtualGridDateTimeEditor | Represents a date time editor | |
VirtualGridDropDownListEditor | Represents a DropDownList editor | |
VirtualGridMaskedEditBoxEditor | Represents a masked editbox editor | |
VirtualGridSpinEditor | Represents a spin editor | |
VirtualGridTextBoxControlEditor | Represents a textbox control editor | |
VirtualGridTextBoxEditor | Represents a textbox editor | |
VirtualGridTimePickerEditor | Represents a time picker editor | |
VirtualGridBrowseEditor | Represents a browse editor | |
VirtualGridColorPickerEditor | Represents a color editor |
RadVirtualGrid exposes an API for defining the data types of its columns. If the data type is explicitly set it wil determine the cell editors used in this column. Otherwise, the editor is determined by the cell value. The API works by column index.
Defining a Columns`s Data Type
this.radVirtualGrid1.MasterViewInfo.ColumnDataTypes[0] = typeof(int);
Me.radVirtualGrid1.MasterViewInfo.ColumnDataTypes(0) = GetType(Integer)
Reading a Columns`s Data Type
Type dataType = this.radVirtualGrid1.MasterViewInfo.GetColumnDataType(1);
Dim dataType As Type = Me.radVirtualGrid1.MasterViewInfo.GetColumnDataType(1)