angulargridinfragisticsigx-grid

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.


Solution

  • 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