grid: How to update Date Update and Date Insert automatically

Hello,

I am new to the SyncFusion grid. I have sucessfull designed a CRUD grid on the given sample Library Management. However, I want the DateUpdate or DateInsert to be updated automatically without user input.






Thank you in advance

Sam


3 Replies

SP Sarveswaran Palani Syncfusion Team May 2, 2022 10:58 AM UTC

Hi Sao,


Greetings from Syncfusion support.


Query: "I want the DateUpdate or DateInsert to be updated automatically without user input"


We have analyzed your query and we suggest you to achieve your requirement using DefaultValue property of the GridColumn Component.  Using this feature, we can define default value for the column while inserting a record.


Refer our UG documentation for your reference : https://blazor.syncfusion.com/documentation/datagrid/editing#default-column-values-on-adding-new-record


Please get back to us if you have further queries or if above solution does not match your requirement.


Regards,

Sarveswaran PK



SA Sao May 2, 2022 12:59 PM UTC

Dear Sarveswaran,

Thank you for your assistance, I have added DefauktValue but they did not save to the database when Update or Insert now record.

Am I missing something?



Sam



RS Renjith Singh Rajendran Syncfusion Team May 3, 2022 10:05 AM UTC

Hi Sam,


We suspect that you are having a similar scenario as discussed in the below documentation. We suggest you to refer the below documentation for more details and handle the db update codes programmatically using grid events.

https://blazor.syncfusion.com/documentation/datagrid/editing#configure-the-datagrid-component-to-perform-crud-actions-using-grid-events


Please get back to us if you need further assistance.


Regards,

Renjith R



Loader.
Up arrow icon