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

My own cell validation

Thread ID:





6615 Aug 19,2003 05:33 PM UTC Aug 19,2003 05:52 PM UTC WinForms 1
Tags: GridControl
Aaron Ching
Asked On August 19, 2003 05:33 PM UTC

Hi, I'm doing my own validation on various cells, and I can't get the focus to stay on the invalid cell if the user tabs out of that cell. This is what I'm doing: On OnCurrentCellEditingComplete, I do my validation on the current cell. When the cell data is invalid, I want to stay focused on that cell and ideally BeginEdit on the same cell again. How can I do this?

Administrator [Syncfusion]
Replied On August 19, 2003 05:52 PM UTC

Instead of OnCurrentCellEditingComplete, use OnValidateCurrentCell instead. (Use CurrentCell.Renderer.ControlText to get the 'new' text value and do your validation on it.) If validation fails, set e.Cancel = true. You can also set CurrentCell.ErrorMessage if you want to display a message. Setting e.Cancel = true will force the currentcell to stay put.


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