angularigx-grid

igx grid inline feature doesn't work well with custom columns


I working on inline edit using ignite-ui-angular grid and it highlights all rows when I select a row and also save/cancel prompt panel appears in wrong rowenter image description here. Their example works but I am customizing column so I think that maybe the problem but not sure how to fix it.


Solution

  • As stated in the Grid Row Editing topic, 'primaryKey' is required for row editing operations.

    <igx-grid 
      [data]="data" 
      [primaryKey]="'ProductID'" 
      width="100%" 
      height="500px" 
      [rowEditable]="true"
      ></igx-grid>
    

    Having in mind that, I assume that in your scenario ‘primaryKey’ is set to a column that is not existing in the underlying data source of the igxGridComponent.

    Please verify that the primary key is set correctly.