Have a grid with a checkbox column and with a client template that includes a master checkbox. Im able to check/uncheck all checkboxes. However now I need to only check those that are not disabled. Checkbox click event passes "ele" to this method checkAll. Check/uncheck all works, but how to check first if the disabled property is set?
01.
function
checkAll(ele) {
02.
var
state = $(ele).is(
':checked'
);
03.
var
grid = $(
'#MyGridList'
).data().kendoGrid;
04.
$.each(grid.dataSource.view(),
function
() {
05.
//$(".chkbx").prop("checked", state);
06.
07.
//todo dont allow disabled lines to be selected
08.
if
($(
".chkbx"
).prop(
"disabled"
) ==
false
) {
09.
console.log(
"check checkbox"
);
10.
}
11.
else
{
12.
console.log(
"dont check checkbox"
);
13.
}
14.
15.
});
16.
17.
}