We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

hidden id column

I have try syncfusion SfGrid into my Blazor server project. I have used Guid as Primary key in my database table.

inside SfGrid, I have put the ID column Visible=false. the ID field will auto generate by api side.

I can add new record into my table as well include my id logic.

SfGrid automatically refresh data but new record always empty ID.

So that, my face problem is I cannot Edit the new record (new record that inserted always empty ID).

any idea to resolve this issue?

2 Replies 1 reply marked as answer

PS Prathap Senthil Syncfusion Team November 21, 2022 07:58 AM

Hi Vandy,

Greetings from Syncfusion support

Based on your reported issue, If the primary key column value is Auto Incremented in your database, kindly define the IsIdentity property of GridColumn as true for the PrimaryKey column. The IsIdentity is enabled, then it will be considered as a read-only column when editing and adding a record. Kindly refer to the below reference link for your reference.

Reference Link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html?_ga=2.79589267.606636547.1668964143-1012522953.1649837807#Syncfusion_Blazor_Grids_GridColumn_IsIdentity



Prathap S

Marked as answer

VA vandy replied to Prathap Senthil November 25, 2022 10:47 PM

Yes it was resolved now.

Live Chat Icon For mobile
Up arrow icon