:: Home >>

Data sources

ActiveWidgets controls provide flexible API for manipulating control data and linking to the external data sources. Get and Set methods for the related data properties are organized into the groups called ‘models’. Each group (model) provides the default implementation for the internal data store (javascript array) but also allows redirecting all property requests to the external object, for example XML or CSV data source.

In the most simple case the grid data is stored in the javascript array and the array reference is assigned with setCellData() method

// grid data in javascript array
var myCells = [
 ["MSFT","Microsoft Corporation", "314,571.156", "32,187.000"],
 ["ORCL", "Oracle Corporation", "62,615.266", "9,519.000"],
 ["SAP", "SAP AG (ADR)", "40,986.328", "8,296.420"],
 ["CA", "Computer Associates Inter", "15,606.335", "3,164.000"],
 ["ERTS", "Electronic Arts Inc.", "14,490.895", "2,503.727"]
];

// create new grid object
var obj = new AW.UI.Grid;

// assign reference to the data array
obj.setCellData(myCells);

Comments

10 Mar 10
Local Machine ADO Robert (0)
4 Apr 08
Can I put this script in a function MakeGrid(tab[][]) Maher (1)
14 Mar 08
Can I put a Javascript function in the Array? Tom Hughes (1)
1 Nov 07
Is setCellData the same as setCellText? Deanio (3)
21 Mar 07
How can i get the data from database Sumi (1)
2 Feb 07
how can i run the programs? (1)

Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5