简体   繁体   中英

enable or disable row editable per row based on condition infragistic grid

I need to make a row editable based on grid data. Some rows will be editable and some will not. I tried cellEditExit/cellEdit event and tried to cancel the event but didn't work.

Using (rowEditEnter) and (cellEditEnter) is the correct approach. I am surprised that it didn't worked:

<igx-grid [data]="data" height="550px" primaryKey="ProductID"
        [rowEditable]="true"
        (rowEditEnter)="rowEditEnter($event)"
        (cellEditEnter)="cellEditEnter($event)"
...
public rowEditEnter(evt) {
    evt.cancel = true;
}
public cellEditEnter(evt) {
    evt.cancel = true;
}

You can use this sample and topic as a reference and understand the event cancelation sequence .

Which version of the product are you using? My recommendation is to use the latest version of 11.1.7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM