Problem with primary keys to use persistSelection

Hello, I have an issue with my grid component.

I'm using persistSelection as true, but when I use paging I have multiple items selection set to True, because some items have the same ID but with different "IdOrganizacao".

That way I need a primary key that uses two arguments, because when I set two columns as PrimaryKey, the grid just use the First Primary Key as argument to persist my selection.

I know I can just make a new var with both ids and set a column to use this  var, but I want to know if have some other way to do that.

Can someone help me? 
Thank you.


1 Reply

PS Pavithra Subramaniyam Syncfusion Team November 15, 2021 09:26 AM UTC

Hi Lucas, 

Greetings from Syncfusion.  

In Essential JavaScript 2 Grid Persist selection, it is essential to define a Primary column with unique values. You can define multiple Primary key column that have unique values. However, the Grid actions which need primary key value will be done based on the first Primary key column in the Grid.  
  
Regards,  
Pavithra S.

Loader.
Up arrow icon