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.
Hi,
In a datagrid, I would like to compare a cell values to itself (before and after making the changes) and return the cell position if the cell is changed. I tried it with CurrentCellChanged/CurrentCellChanging event handler and it does not seem to work. How do I do it?
Please help.
Chris
ADAdministrator Syncfusion Team February 23, 2004 05:28 PM UTC
CurrentCellChanging fires with every keystroke. CurrentCellValidating fires when you try to leave the cell.
If you want to catch every keystroke, then use CurrentCellChanging. If you only want to handle the final changed value, then handle CurrentCellValidating.
In both places, you get the values like this:
GridCurrentCell cc = this.grid.CurrentCell;
string oldValue = this.grid[cc.RowIndex, cc.ColIndex].Text;
string newValue = cc.Renderer.ControlText;
ADAdministrator Syncfusion Team February 23, 2004 05:46 PM UTC