3.2.0

how to get the checkbox object

my code is:
var grid = new AW.UI.Grid;
grid.setId("div1");
grid.setCellData(function(col, row){return "cell " + col + "." + row});
grid.setColumnCount(5);
grid.setRowCount(20);
grid.setSelectionMode("multi-row-marker"); // set selection mode to single row
grid.refresh();

i want to get the checkbox object and set it readonly.
help me!
lprince
September 5,


Hi,
This might not be a good approach but try if it works fine for your requirements.

var grid = new AW.UI.Grid;
grid.setId("div1");
grid.setCellTemplate(new AW.Templates.CheckBox, 0);
grid.setCellData(function(col, row){return "cell " + col + "." + row});
grid.setColumnCount(5);
grid.setRowCount(20);
grid.setSelectionMode("single-row"); // set selection mode to single row
grid.refresh();

function getSelectedRecordsIndex()
{
for(var i=0;i<grid.getRowCount();i++)
{
var c = grid.getCellTemplate();
c.setAttriburte("readonly","true");
grid.setCellTemplate(0,i);
}
}
Lalit
September 5,

This topic is archived.

See also:


Back to support forum