Search
DateTimeType Class
See Also
 






Provides functionality for grid columns that display date-time values.

Namespace: MindFusion.DataViews
File: DateTimeType.js

 Syntax

JavaScript  Copy Code

// class
DateTimeType.prototype = {}

 Example

The following code creates a list with GridColumn-s isntances, one of which is of type DateTimeType:

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);

var column4 = new dv.GridColumn("registered");
column4.dataType = dv.DateTimeType;
column4.caption = "Registered";
column4.metaData.set("customEditor", {
    autoComplete: false,
    allowEmptyInput: false,
    locale: locale
});
columns.push(column4);

// 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

MindFusion.DataViews.DataType
    MindFusion.DataViews.DateTimeType

 See Also