Composite key

How would I set up a grid with a model with a backing composite primary key

I am not sure how I would specify a composite primary key in the grid, and there must be a key for editing or adding to take place I believe.


3 Replies

SP Sarveswaran Palani Syncfusion Team April 12, 2024 01:53 AM UTC

Hi Wuss,

Greetings from Syncfusion support,

For performing editing or adding action, it’s necessary to set primary key in any one of the unique value column to perform CRUD operation in a grid .But currently we didn’t have support for composite key. So that, we have considered it as an uncertain improvement and logged a task “Provide multiple primary key column support in Grid”. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. And this improvement will be included in any of our upcoming releases.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.

https://www.syncfusion.com/feedback/13521/provide-multiple-primary-key-column-support-in-grid

You can also communicate with us regarding the open feature any time using our above feedback report page. We do not have immediate plan to implement this feature and it will be included in any of our upcoming releases. Please cast your vote to make it count. So that we will prioritize the improvement for every release based on demands.

Regards,
Sarvesh



WW Wuss Wuzz April 12, 2024 10:58 PM UTC

Thank you for your replay I was able to work around it by specify one part of the key as a route param but did not mark it as the primary key and the other part i did mark as the PKey and that was sent when make put or delete request. But I was lucky that the composite key was only made of 2 parts.



PS Prathap Senthil Syncfusion Team April 15, 2024 12:54 PM UTC

Based on your update, it seems like you've found a workaround for the feature by specifying one part of the key as a route parameter and marking the other part as the primary key. Since your composite key consists of only two parts, this approach worked for you. While the Syncfusion datagrid doesn't currently support multiple primary key columns in their grid, we kindly request you to track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the feedback previously shared.


Loader.
Up arrow icon