Hello!
I'm having some problems with the grid and the datetimepicker control. I'm using the 22.2.8 version and working with .net 7 project.
When I save the data in the grid, it saves mi correctly the data in the database. This is the grid when editing the data
and this is the data in the database
But, when the grid needs to display then updated data after saving it, it shows me like this
Data in the database is still ok:
The time is correct OnPostUpdate in value.Value object.
So, when I just hit the F5 for the refresh on the current page, the grid shows the correct data
Maybe I'm missing some JsonSerializer options or something like that?
Thanks!
Bernard.
I forgot to mention that I'm using onBegin function for saving the data from the grid:
function onBegin(args) {
if (args.requestType === 'save') {
args.data.Pocetak = ejs.data.DataUtil.dateParse.addSelfOffset(new Date(args.data. Pocetak)).toISOString();
args.data.Kraj = ejs.data.DataUtil.dateParse.addSelfOffset(new Date(args.data.Kraj)).toISOString();
}
}
Regards,
Bernard.
Hi Bernard Jurlina,
Greetings from Syncfusion support.
Upon attempting to run your provided sample, we encountered the following error. Therefore, we kindly request you verify whether the given sample is a fully functional working sample or a code snippet that only demonstrates the code. If it is intended to be a runnable sample, please furnish us with a step-by-step procedure to execute the sample successfully.
After reviewing your provided code, we have noticed that you are utilizing the addSelfOffset method of the DataManager during the data-saving process. In order to proceed, kindly furnish a comprehensive explanation detailing the purpose or reason behind your decision to employ the addSelfOffset method. This information will assist us in gaining a deeper understanding of your approach.
Regards,
Hemanth Kumar S
Hi Kumas S,
thank you for the answer. Meanwhile, I got this to work with this solution:
I added this lines in the Program.cs file
and then I remove using the addSelfOffset method on grid save action.
Everything is working fine now.
Thanks again for your response.
Regards,
Bernard.
Hi Bernard,
We are glad, please get back to us for further assistance when needed.