Initializes a new instance of the GridColumn class.
Namespace: MindFusion.DataViews
File: GridColumn.js
JavaScript Copy Code |
---|
function GridColumn ([name, [dataType, [editable]]]) |
String. The name of the field, displayed in the column.
An instance of a DataType-derived class. The type of the column. The classes incluse IntegerType, StringType, ImageType etc.
Boolean. A value indicating whether the cells in this column can be edited.
The following code creates a new Grid instance with 3 GridColumn-s and sets some of the Grid properties:
JavaScript Copy Code |
---|
var dv = MindFusion.DataViews; var column1 = new dv.GridColumn("index"); var column2 = new dv.GridColumn("name"); var column3 = new dv.GridColumn("state"); var columns = [column1, column2, column3]; // create the grid control // disable inplace editing |