Adds a row to the backing store.
Namespace: MindFusion.DataViews
File: GridModel.js
JavaScript Copy Code |
---|
function addRow ([rowData, [index]]) |
Object. The values to add.
Number. The index at which to insert the data.
Number. index The index of the new row.
The following code creates a Grid and inserts an array with data for one grid row at the first position:
JavaScript Copy Code |
---|
var dv = MindFusion.DataViews; // create the grid columns var column1 = new dv.GridColumn("index"); var column2 = new dv.GridColumn("name"); var column3 = new dv.GridColumn("winnings"); var column4 = new dv.GridColumn("registered"); // create the grid control var dataList = [0, "Colorado Eagles", "12", new Date()]; |