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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Check if cell data changed.

Thread ID:





21238 Nov 4,2004 07:50 PM UTC Nov 4,2004 11:20 PM UTC WinForms 1
Tags: GridControl
Chris Thompson
Asked On November 4, 2004 07:50 PM UTC

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?

Administrator [Syncfusion]
Replied On 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;


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon