Category / Section
How to toggle checkbox selection using code in .NET WebForms TreeGrid?
1 min read
In TreeGrid, using the public method selectRows it is possible to select/unselect the record using checkbox selection programmatically. It’s necessary to set the “toIndex” parameter as “null” and “isCheckbox” parameter as “true”.
Please refer the code snippet below.
function click(args) { var obj = $('#TreeGridContainer').data("ejTreeGrid"), rowindex = [2,4,6]; // row index for(var x = 0; x < rowindex.length; x++){ obj.selectRows(rowindex[x],null,true); //(rowIndex, toIndex, isCheckbox) } }
Sample
Please refer the Sample link for more information.