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.

how to control the user input

Thread ID:





18487 Sep 1,2004 06:29 AM Sep 1,2004 07:05 AM Windows Forms 1
Tags: GridControl
Asked On September 1, 2004 06:29 AM

Hi Clay, Could you please advice on how to control user input. Does a databound grid cell have kind of ‘numeric’ property or I have to write code to validate the input. Then what is the best event to do that. I want to allow the user to enter into the cell only numbers with one decimal point in the range from -99.9 to 99.9 and do not allow to type letters at all. I set the cell type of double and use gdbg.Binder.InternalColumns[“colname”].StyleInfo.Format = "#0.0"; It still allows user to enter many decimal points and type letters. What is the best way to fix that? Thanks in advance

Administrator [Syncfusion]
Replied On September 1, 2004 07:05 AM

To do chacter by character validation, you will have to use the CurrentCellValidateString event. There, check e.Text to make sure it is valid, and set e.Cancel = true if it is not. To get teh row and column of the cell being validated, use grid.CurrentCell.RowIndex/COlindex.


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.