Only using a checkbox to select an item in a Data Grid

0
Hi there. So I am working on a project and was asked to have a table (currently a data grid) with checkboxes that control the multi-select rather than clicking on the actual rows. I have investigated several options such as using CSS / JS to append checkboxes, but this would still mean that clicking anywhere on the row would select the object. I have also looked into Data Grid 2 but it currently does not support multi-select and creating a separate entity/attribute to control selection is not desirable as we will have multiple users on this page at once and relying on the database may lead to errors arising such as a user selecting a row on their screen removes another user’s selection. I have also looked at the Tree / Node widget that does support checkbox selection support but this would require a heavy restructuring of the current entity which is also not desirable.  Therefore I wanted to see if there were any other known options available. I have included a design below of the desired result. Thank you.   
asked
2 answers
1

You can accomplish this with some CSS: https://gist.github.com/cdcharlebois/efc6c0cdaea08f3352c7fa43ceda7307
 

/* add the "dg-checkboxes" class to your data grid in studio pro */
.mx-datagrid.dg-checkboxes tbody tr:after{
    color: red;
    font-size: xx-large;
    position: absolute;
    left: -15px
}
.mx-datagrid.dg-checkboxes tbody tr.selected:after{
    content:"☑";
}
.mx-datagrid.dg-checkboxes tbody tr:not(.selected):after{
    content:"☐";
}

 

answered
-1

I have a simple suggestion

Convert the Data grid to List view 

In the list view add a check box and map it to  a  new boolean attribute

 

answered