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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

NumericUpDown CellType question

Thread ID:

Created:

Updated:

Platform:

Replies:

39754 Jan 18,2006 01:43 AM UTC Jan 18,2006 11:50 AM UTC WinForms 2
loading
Tags: GridControl
Brian Walker
Asked On January 18, 2006 01:43 AM UTC

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 07:35 AM UTC

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

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.

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

;