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

how to control the user input

Thread ID:





18487 Sep 1,2004 10:29 AM UTC Sep 1,2004 11:05 AM UTC WinForms 1
Tags: GridControl
Asked On September 1, 2004 10:29 AM UTC

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 11:05 AM UTC

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.

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