It appears that when using an igGrid with multipleSelection set to true and enableCheckBoxes set to true that the only way to select the row is to click directly inside the checkboxes for the row. If the user slightly misses a checkbox or clicks anywhere else on the row, all rows are deselected and the row clicked on is selected instead. What's the best way to prevent this default behavior? I'm not exactly sure what the best way to be more forgiving when a user clicks on a row instead of a checkbox, but I'm leaning towards the best solution being that clicking anywhere on a row will toggle the selection and leave all of the other selected rows alone.
Hello James,
I have been looking into your requirements and I could suggest you handle the rowSelectionChanging event of the Selection feature like this:
{
name: "Selection",
mode: "row",
rowSelectionChanging: function (evt, ui) {
if ($(ui.row.element).find("td.ui-iggrid-selectedcell").length === 0)
setTimeout(function () {
$("#grid1").igGridSelection("selectRow", ui.row.index);
}, 100)
else
$("#grid1").igGridSelection("deselectRow", ui.row.index);
return false;
},
cellSelectionChanging: function (evt, ui) {
multipleSelection: true
Please let me know if this helps.
That works great. Thanks for your assistance!