Hi,
I am using the selectable column to select checkboxes, I need to disable the checkboxes for a few rows based on a value from the dataset for the particular row.
On the event of the grid "edit", I am disabling editing for certain rows based on a condition but the checkboxes for those rows can still be checked. I need to prevent/disable checking of the checkbox for the same rows based on the same condition.
I have to use the selectable column for checkboxes and not a custom template.
I have defined the grid below.
Grid Definition
$(
"#grid"
).kendoGrid({
dataSource: DataSource,
pageable: {
pageSizes:
true
},
filterable: {
extra:
false
,
operators: {
string: {
startswith:
"Starts with"
,
contains:
"Contains"
,
eq:
"Is equal to"
,
neq:
"Is not equal to"
}
}
},
sortable:
true
,
groupable:
true
,
editable:
true
,
resizable:
true
,
scrollable:
false
,
detailInit: detailInit,
toolbar: [
"Save"
, "Cancel"],
edit:
function
(e) {
if
(e.model.ClaimStatus != ClaimStatusCode.Draft && e.model.ClaimStatus != ClaimStatusCode.Complete && e.model.Status != ClaimLineItemStatusCode.Rejected) {
e.sender.closeCell();
}
},
excelExport: generateExcelFile,
dataBound:
function
() {
highlightFailedClaimLines();
},
columns:
[
{ selectable:
true
, width:
"50px"
},
{ field:
"ValidationStatus"
, title: ResourceLabels.Label_ValidationStatus, hidden:
true
},
{ field:
"Id"
, title: ResourceLabels.Label_Grid_CustomerName, hidden:
true
},
{ field:
"IsOverridden"
, title: ResourceLabels.Label_Override },
{ field:
"OverrideReason"
, title: ResourceLabels.Label_OverrideReason },
{ field:
"RuleFailure"
, title: ResourceLabels.Label_RuleFailure, hidden:
true
},
{ field:
"ValidationError"
, title: ResourceLabels.Label_ValidationError, hidden:
true
}
],
change: onCheckBoxSelect,
saveChanges: gridSaveChanges,
});