We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Check if cell data changed.

I need to change the contents of a cell when someone makes a change to any other cell in a row in a data bound grid. I was using CurrentCellEditingComplete but this will fire if an editable cell is clicked on and then off. This does not mean the data was actually changed. If I can get to the row of the dataset I can check the rowstate and all is well. This becomes a problem if the grid is sorted. My row number no longer matches the actual row in the dataset. How can I check if the data in a cell was actually changed and not just clicked on/activated?

1 Reply

AD Administrator Syncfusion Team November 4, 2004 11:20 PM UTC

You can try using either CurrrentCellValidating or CurrentCellConfirmChanges. To get the grid row in thes events, you can use grid.CurrentCell.RowIndex. You might alos need grid.CurrentCell.Renderer.ControlText (holds teh new value). To get the record (Actually the DataRowView) from the rowindex in a sorted grid, you can use the currencymanager. CurrencyManager cm = (CurrencyManager) grid.BindingContext[grid.DataSource, grid.DataMember]; DataRowView drv = cm.Current;

Live Chat Icon For mobile
Up arrow icon