3.2.0

Create checkbox in grid with Strings/Dates in other columns

When building a grid I create arrays for the columns, formats, and the data.

The format array currently includes strings, dates and num defined by:
var formatDt = new AW.Formats.Date;
var formatNum = new AW.Formats.Number;
var formatStr = new AW.Formats.String;
What format do I define for a checkbox?

The code for building the grid will include the following, but will need to include checkboxes:
obj.setId(gridID);
obj.setCellText(null);
obj.setCellData(
function(col, row) {
if(data[row][col]==0) {
return '';
}
else {
return data[row][col];
}
});
obj.setCellFormat(formats);
obj.setHeaderText(columns);
obj.setRowCount(data.length);
obj.setColumnCount(columns.length);

How do I include a checkbox in such a grid?
AI
October 27,
obj.setCellTemplate(new AW.Templates.Checkbox, 0);
Alex (ActiveWidgets)
October 27,
Thanks Alex.
AI
October 28,

This topic is archived.

See also:


Back to support forum