Search
DataType Class
See Also
 






A base class for data types.

Namespace: MindFusion.DataViews
File: DataType.js

 Syntax

JavaScript  Copy Code

// class
DataType.prototype = {}

 Example

The following code creates a list with GridColumn-s isntances, whose dataType properties are set to classes that derive from DataType: IntegerTypeStringType, CurrencyType:

JavaScript  Copy Code

var dv = MindFusion.DataViews;

// create the grid columns
var columns = [];

var column1 = new dv.GridColumn("index");
column1.dataType = dv.IntegerType;
column1.editable = false;
column1.caption = "#";
columns.push(column1);

var column2 = new dv.GridColumn("name");
column2.dataType = dv.StringType;
column2.caption = "Name";
columns.push(column2);

var column3 = new dv.GridColumn("winnings");
column3.dataType = dv.CurrencyType;
column3.caption = "Winnings";
columns.push(column3);

// create the grid control
var grid = new dv.Grid(document.getElementById("grid"));
grid.theme = "blue";
// set the model
grid.model = new dv.ArrayModel(participants, columns, "index");

 Inheritance Hierarchy

 See Also