Hi,
I have 2 questions
Is there any way to hide ID during adding a new record?
data is not saved in the table but is displayed in the grid with ID is 0 and disappears when reload the page
Attached are screenshots for your reference.
Best regards
SAM
Hi Sao,
Greetings from Syncfusion support.
Hello,
You have answered one of the questions. The other issue I faced was not able to save data to the SQL server due to the ID always having the value of 0.
Could you please address that
Hi Sam,
Thanks for contacting Syncfusion Support.
We have analyzed your query and found that you have defined the ID column as IsIdentity and IsPrimaryKey. IsIdentity property must be enabled to column whose values are auto incremented in database. However, the value is still 0 to that column in your sample. So we need some more details about the issue you are facing.
Kindly share the following details to validate the reported query further at our end.
Above requested details will be helpful for us to validate the reported query at our end and provide solution as early as possible.
Regards,
Sarveswaran PK
Hello,
I would like to provide the following
Hi Sam,
Thanks for sharing the details.
The reported issue will occur when newly inserted records do
not get updated in the database properly. We couldn’t find any video demo in the
attachments, so kindly share the video demo of the issue. Also, we could find
some changes in the CRUD method
in the
LibraryService. Previously they were named as InsertGL, UdpateGl, and DeleteGl. But
in the recently shared code example, they were defined as InsertImportantData,
UpdateImportantData etc. .So kindly ensure the same that the records were
properly updated in the database in the OnActionBegin event handler.
Kindly ensure the reported issue by defining the OnActionFailure event of Grid. If you are facing any exceptions, kindly share the error details which will be very helpful for us to analyze the issue further at our end.
Regards,
Vignesh Natarajan
Hello,
Video is on slide 3 of the powerpoint attachment, kindly play it.
Regards
Samnang
Hi Sam,
Sorry for the inconvenience caused.
We have reviewed the video demonstration shared in the PPT and from the video demo, we understand that newly inserted records do not get inserted into your database properly using the OnActionBegin event. Hence on refreshing the page, the inserted record does not exist. We suspect some issues occur while inserting the records into your database using the LibraryService method.
Note: When IsIdentity is enabled, that particular column will be disabled from inserting and editing. so that column value will be auto-updated while inserted into the database. Hence 0 will be the default value. but once inserted, it will be refreshed properly in the OnActionComplete event.
So kindly confirm that newly inserted records get inserted properly into your database in the OnActionBegin event using LibraryService.InsertGL(Args.Data) method. If you are still facing the reported issue, kindly get back to us with more details about the issue you are facing.
Regards,
Vignesh Natarajan