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.
When editing a cell I want to update that cell''s Text (its a TextBox cell) to the old value. It then gets updated once the server has been updated, and propogates its changes back to the client.
I use TableControlCurrentCellStartEditing to capture the old value, and TableControlCurrentCellEditingComplete to set the control text back to old value like:
gcrb.ControlText = oldValueArgs.ToString();
where gcrb is GridTextBoxCellRenderer.
This works fine if the user hits Enter on the keyboard but if they tab, use arrow keys, or click with mouse elsewhere, the value is not changed back to the old value. Also, for arrow and tab, the icon on the LHS of grid remains as editing (icon of a writing pencil).
I tried using TableControlCurrentCellControlLostFocus to update the cell''s control text, but this has no impact. Again, I use gcrb.ControlText, and I can see that its value is updated in the code, but not in the grid.
ADAdministrator Syncfusion Team August 16, 2006 12:15 AM UTC
So, you want to let your user type into a cell, but when he leaves it, you catch the new value and reset the cell to its old value? If so, I think you can do this by handling a single event, TableControlCurrentCellAcceptedChanges. Here is a little sample.
I noticed that if you edit the cell once, and hit return, the cell goes back to previous value. If you then update the cell again without moving from cell first, the value updates on the grid, i.e. doesn''t revert back to original value.
Actions: Edit: 1 -> 2 -> 1 Then without moving. Edit: 1 -> 3 stays as 3.
This occurs on your example project to. I assume this is because the cell gets marked as ahving rejected the change once, so next time doesn''t. Is there a way to reject and then have cell as initial state?