The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
within this event, I capture the checked state of the checkbox and update the backend server with the new state, now if the server update fails, i want to revert the checkbox to its original checkstate before returning from this event, how do i go about this.
HAhaneefm Syncfusion Team June 6, 2007 06:33 PM UTC
Hi Nedu,
The TableControlCheckBoxClick is the event that gets triggered only when user clicks using the mouse on the checker box of checkbox cell. You can catch the TableControlCurrentCellChanged event for detecting any changes made to the checkbox cell. If the update fails, then you can set cell value using the CurrentRecord.SetValue method in a grid. Below is a code snippet
How do I get the original checkstate of the checkbox, if the server update fails, I want to stop the change from going thru.
For instance, lets say the checkbox has a value of [True or Checked], a user clicks on it to change it to [False or UnChecked], I capture that click event and update the server with the new value, which would be [False or UnChecked] now and all is fine
However, if the update to the server fails, I want to keep the original value of the checkbox which is [True or Checked] in this case...