Setting Identifier for a grid 19.2

Certified Senior Developer

In 19.2 grid, there is no way to set the identifier for the rows of data. When selecting a row, the identifier is set to the row selected.This is all good, but lets say I have an initial grid that has 7 rows of data:

{{id: 3, name: 'Apple'},

{id: 33, name: 'Beet'},

{id: 4, name: 'Corn'},

{id: 18, name: 'Donut'},

{id: 23, name: 'Duck'},

{id: 43, name: 'Pear'},

{id: 33, name: 'Watermelon'}}

and it's sorted by name alphabetically. If I were to selected Apple and Corn, 1;3 would be saved into local!selected. Then If I were to filter the grid to only return Corn and I deselected that, 1 is removed from local!selected, and when I clear out the filter , Corn is still selected while Apple is now deselected. Is there a way to get around this and have identifier set to the primary key of the cdt?

  Discussion posts and replies are publicly visible