Hi Ugur,
In TreeGrid “rowSelected” event contains same arguments on when we selecting the row by click on row element and checkbox element. So we can’t differentiate the checkbox click action and row selection action using “rowSelected” event.
In TreeGrid we have “recordClick” event, it will be triggered with current target element before the row/checkbox get selected/updated. Hence we have achieved your requirement by enabling a flag in “recordClick” event to identify weather the checkbox get clicked or not, using this flag we can achieve your requirement.
Please refer the code snippet below.
[HTML]
$(function() {
var checkboxFlag = false;
var gridOptions = {
rowSelected: function (args) {
if (checkboxFlag) {
alert(args.data.checkboxState);
checkboxFlag = false;
}
},
recordClick: function (args) {
if (args.targetElement.hasClass('e-checkbox'))
checkboxFlag = true;
},
//..
};
//..
}); |
Please find the modified sample from below location.
Please let us know if you need any other assistance.
Regards,
Suriyaprasanth R.