igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

igxGrid - primaryKey specification and implementation

Open ViktorSlavov opened this issue 8 years ago • 0 comments

Description

In order for the igx-grid component to accommodate additional features (e.g. row selection) while still using data virtualization, a new way to select data rows needs to be introduced.

Implement a new feature for the igx-grid component that allows a primaryKey attribute to be passed. The value specified in the primaryKey should specify a parameter from that data set that will be used as a unique identifier for the rows in the grid. This primaryKey can be used for selecting rows wherever the current method (using row index) is not applicable (e.g. addressing rows persistently through sorting and filtering) .

Steps to reproduce

  1. Create a grid and try to programatically select a row using index.
  2. Filter and/or sort the grid
  3. Select the row at the same index as in step 1

Result

The row data is different.

Expected result

There should be a way to consistently select the data object corresponding to a row. This selection should not be related to the row's position in the viewport.

ViktorSlavov avatar Mar 21 '18 13:03 ViktorSlavov