You probably already know that DataTable has the ability to show checkboxes instead of plain text data. It allows you to provide a simple solution for status marking and data selection.
Basic checkboxes
The minimal code for initializing a DataTable with checkboxes will look as follows:
view:"datatable",
columns:[
{ id:"status", header:"Is Active", width:80, css:"center",
template:"{common.checkbox()}"},
{ id:"value", header:"Records", fillspace:1 },
],
data: [
{ status:0, value:"Record A"},
{ status:1, value:"Record B"},
{ status:0, value:"Record C"}
]
});
It will result in a nice-looking JavaScript grid presented in the picture below. The “{common.checkbox()}” line in the template expands in a checkbox control.