This topic discusses various built-in editors of FlexGrid, and operations related to them. The topic also takes you through the steps to apply custom editors in the FlexGrid columns.
Built-in Editors
FlexGrid provides several built-in editors to enable efficient in-cell editing. The grid uses TextBox control as its default editor. However, other built-in editors such as numeric, date, and checkbox are also supported. The column's DataType property is read-only, and cannot be set explicitly. The FlexGrid control, provides a default column editor that varies depending upon the type of data. For a column having Boolean values, FlexGrid automatically displays a checkbox, likewise when a column has double values, it displays numeric editor. In order to set DateTime editor, you must add the column using GridDateTimeColumn in XAML markup to display date editor as column's datatype.
XAML |
Copy Code
|
---|---|
<Grid> <c1:FlexGrid Name="flexGrid1" AutoGenerateColumns="False"> <c1:FlexGrid.Columns> <c1:GridColumn Binding="FirstName"></c1:GridColumn> <c1:GridColumn Binding="Email"></c1:GridColumn> <c1:GridColumn Binding="CountryId" ColumnName="Country"></c1:GridColumn> <c1:GridDateTimeColumn Binding="LastOrderDate" Mode="Date"></c1:GridDateTimeColumn> <c1:GridColumn Binding="OrderTotal"></c1:GridColumn> <c1:GridColumn Binding="Active"></c1:GridColumn> </c1:FlexGrid.Columns> </c1:FlexGrid> </Grid> |