Checkbox (checked / unchecked) based on values in grid
Hello,
I'm loading my grid from PHP MySQL. When I'm trying to set a column as a checkbox based on the value in there, the grid returns 'undefined', can someone help me with my code?
Thanks in advance!
// Set grid text
obj.setHeaderText(myHeaders);
obj.setCellText(function(c,r){return CellData[r][c]} );
// obj.setCellText(myCells); // Original fill method - DO NOT USE this method to fill grid. Because of the checkboxes!
// Checkboxes
// add a checkbox to col 8 (the 9th col)
obj.setCellTemplate(new AW.Templates.Checkbox, 8);
// set initial VALUE for column 2 From the CellData array NOTE: MUST BE SET to Boolean true/false.
obj.setCellValue(function(col, row){return CellData[row][8]==1 ? true : false}, 8);
I'm loading my grid from PHP MySQL. When I'm trying to set a column as a checkbox based on the value in there, the grid returns 'undefined', can someone help me with my code?
Thanks in advance!
// Set grid text
obj.setHeaderText(myHeaders);
obj.setCellText(function(c,r){return CellData[r][c]} );
// obj.setCellText(myCells); // Original fill method - DO NOT USE this method to fill grid. Because of the checkboxes!
// Checkboxes
// add a checkbox to col 8 (the 9th col)
obj.setCellTemplate(new AW.Templates.Checkbox, 8);
// set initial VALUE for column 2 From the CellData array NOTE: MUST BE SET to Boolean true/false.
obj.setCellValue(function(col, row){return CellData[row][8]==1 ? true : false}, 8);
John P.
July 27,