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

Datagrid Validation

Thread ID:





11090 Feb 23,2004 05:15 PM UTC Feb 23,2004 05:46 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On February 23, 2004 05:15 PM UTC

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

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

Administrator [Syncfusion]
Replied On February 23, 2004 05:46 PM UTC

Thanks a lot.


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