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.

NumericUpDown CellType question

Thread ID:

Created:

Updated:

Platform:

Replies:

39754 Jan 17,2006 08:43 PM Jan 18,2006 06:50 AM Windows Forms 2
loading
Tags: GridControl
Brian Walker
Asked On January 17, 2006 08:43 PM

Hi, Is it possible to restrict a "NumericUpDown" cell (CellType = NumericUpDown) so that its value can only be changed by the up/down buttons? I require that the cell value range from 100 upto 5000 in steps of 100 and that it must be a multiple of 100. (Eg. 100, 200,... 4900, 5000). Essentially I want to emulate the behaviour of the Windows forms NumericUpDown control which if the ReadOnly property is set to True a user can not type in a new value but CAN use the up/down buttons to increment/decrement the value. Thks in advance, Brian

Administrator [Syncfusion]
Replied On January 18, 2006 02:35 AM

Hi Brain, You can restrict the NumericUpDown cell, by using the NumericUpDown class. Here is the code snippet gridControl1[rowIndex, colIndex + 2].NumericUpDown = new GridNumericUpDownCellInfo(100, 5000, 100, 100, false); And you can able to cancel the editing, by using the KeyDown, KeyPress Events. Kindly refer to sample for details Let me know if you need futher assistance, Regards Madhan

Forum_39574_18Jan06.zip

Brian Walker
Replied On January 18, 2006 06:50 AM

Thanks Madhan - Works perfectly

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.

;