<ejs-grid #grid [dataSource]='data' [editSettings]='edit' (actionBegin)='actionBegin($event)' (rowDataBound)='rowDataBound($event)' >
<e-columns>
<e-column field='OrderID' isPrimaryKey='true' headerText='Order ID' width='120' textAlign='Right'></e-column>
. ..
. . .
</e-columns>
</ejs-grid>
|
App.component.ts
actionBegin (args) {
if (args.requestType === 'beginEdit' && args.row.classList.contains('e-disabled')) {
args.cancel = true;
}
}
rowDataBound(e) {
if(e.data.OrderID % 2 === 0) {
e.row.classList.add('e-disabled');
}
}
|