3.2.0

Load Data acording Index and column

// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;

// set number of rows/columns
obj.setRowProperty("count", 20);
obj.setColumnProperty("count", 5);

// provide cells and headers text
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setColumnProperty("text", function(i){return myColumns[i]});

// set headers width/height
obj.setRowHeaderWidth("28px");
obj.setColumnHeaderHeight("20px");

//get data cell clicked and column 0
obj.setAction("click", function(src){window.status = myData[src.getItemProperty("index")][0];});

// write grid html to the page
document.write(obj);
Rafael Costa, Andrei Barbosa
January 31,

This topic is archived.

See also:


Back to support forum