:: Home >>

JavaScript array

In this example the grid data is stored in a two-dimensional javascript array.

var myData = [
 ["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"]
];

Instead of providing a static text to the grid - you should supply the function, which just returns an array element for a given row and column indices.

obj.setDataProperty("text", function(i,j){return myData[i][j]});

Comments

2 Jan 07
buid a Dynamic and Editable Table which Show the Existing Record in the Datebase prabakar (23)
4 May 06
search engine Cosmin (0)
25 Apr 06
Storing a row's key value Arthur (3)
16 Feb 06
sorting tsukulu (2)
14 Feb 06
Urgent Please Help me .. imthiyaz (5)
23 Dec 05
how to show complete table in jsp atul (0)
how to show the complete table in jsp atul (0)
1 Dec 05
i need raw can be moveup and move down with js sandip thakkar (0)
19 Jul 05
How to put a vaule for particular rows & columns. - pl explain . Jegadeesan (2)
30 Jun 05
asign background image to I-frame (1)
1 Jun 05
Adding dynamic data Matutek (3)
13 Apr 05
How to put a particular value in particular rows & columns in grid. Jegadeesan (0)

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

Documentation:

Recent changes:

2.5.0 - 2.5.2
2.5.2
2.5, 2.5.1
2.5.1
2.5
Release History
2.5
2.0.2
textToValue
textToData