Hi everyone,
My customer want selection checkbox like below picture:
I read this document and set selection mode to Cell by javascript. But it doesn't work. Can any one suggest me an idea. Thank you very much !
https://developer.mescius.com/blogs/wijmo-2020-v1-release-flexgrid-checkbox-selector-column
Thank you very much !
I've found the solution:
let myGrid = OutSystems.GridAPI.GridManager.GetGridById("theGrid").provider;
// Add checkboxes to the "Select" column
flexGrid.formatItem.addHandler(function (s, e) {
if (e.panel === s.cells && e.col === 0) {
e.cell.innerHTML = '';
var checkbox = e.cell.firstChild;
var item = s.rows[e.row].dataItem;
if (!item.IsSelected) {
item.IsSelected = false;
}
checkbox.checked = item.selected;
checkbox.addEventListener('change', function (event) {
item.selected = checkbox.checked;
});
Hi @Kiet Phan ,
You can use the Grid properties to get the Checkbox.
You can also bind the below classes to Product Name column to show Select & Unselect.
"<i class='icon fa fa-square-o'></i>" - UnSelect
"<i class='icon fa fa-check-square-o'></i>" - Select
Regards,
Vinod
Thank for your response.
The RowHeader option's result is Checkbox Column fixed like this. But my customer want the checkbox inside the cell.
Expecting :