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

Check if cell data changed.

Thread ID:

Created:

Updated:

Platform:

Replies:

21238 Nov 4,2004 02:50 PM Nov 4,2004 06:20 PM Windows Forms 1
loading
Tags: GridControl
Chris Thompson
Asked On November 4, 2004 02:50 PM

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 06:20 PM

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;

CONFIRMATION

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.

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.

;