igx 网格内联功能不适用于自定义列

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

我正在使用 ignite-ui-angular 网格进行内联编辑,当我 select 一行并且 save/cancel 提示面板出现在错误的行 时,它会突出显示所有行。他们的示例有效,但我正在自定义列,所以我认为这可能是问题所在,但不确定如何解决。

Grid Row Editing topic 中所述,行编辑操作需要 'primaryKey'。

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

考虑到这一点,我假设在您的场景中“primaryKey”设置为 igxGridComponent 的基础数据源中不存在的列。

请确认主键设置是否正确。