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?



3 Replies 1 reply marked as answer

PS Prathap Senthil Syncfusion Team November 21, 2022 12:58 PM UTC

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

                         https://blazor.syncfusion.com/documentation/datagrid/editing


Regards,

Prathap S



Marked as answer

VA vandy replied to Prathap Senthil November 26, 2022 03:47 AM UTC

Yes it was resolved now.
Thanks



SG Suganya Gopinath Syncfusion Team November 27, 2022 12:46 PM UTC

Vandy,

We are glad that the provided solution worked to solve the issue. Please get back to us for further assistance. 

We are marking this ticket as solved.

Regards,

Suganya Gopinath.


Loader.
Live Chat Icon For mobile
Up arrow icon