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.

My own cell validation

Thread ID:

Created:

Updated:

Platform:

Replies:

6615 Aug 19,2003 01:33 PM Aug 19,2003 01:52 PM Windows Forms 1
loading
Tags: GridControl
Aaron Ching
Asked On August 19, 2003 01:33 PM

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 01:52 PM

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.

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.

;