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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Leave cell when TableControlCurrentCellValidating event fails

Thread ID:





48896 Sep 6,2006 07:06 AM UTC Sep 6,2006 01:51 PM UTC WinForms 2
Tags: Grouping
Asked On September 6, 2006 07:06 AM UTC

Please help!

I am validating an entry in the TableControlCurrentCellValidating event.
I would like to be able to set e.Inner.Cancel = true and reset the cell value to its original value(which is easy enough) and still be able to leave the cell.

However, setting e.Inner.Cancel = true does not allow me to leave the current cell until I correct the cell value.

Administrator [Syncfusion]
Replied On September 6, 2006 10:32 AM UTC

Hi James,

Try this code snippet to resolve this.

private void TableControlCurrentCellValidating(object sender, GridTableControlCancelEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;

if (cc.Renderer.ControlText == "Invalid" )
//To get/set the new cellvalue from cc.Renderer.ControlText:
//To get the old cellvalue from e.TableControl.Model[cc.RowIndex,cc.ColIndex ].Text
cc.Renderer.ControlText = e.TableControl.Model[cc.RowIndex,cc.ColIndex ].Text;

Let me know if this helps.
Best Regards,

Replied On September 6, 2006 01:51 PM UTC

thx Haneef


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