1

Closed

NumericUpDown - Add Support for Nullable Types

description

The NumericUpDown control appears to assume that the source data is from a non-nullable type (double). As such, it will always write a value to a Nullable source property, even if the end user has not actively supplied a value.
Closed May 14, 2009 at 7:23 PM by shawnoster
Comment from developer: Coercion is not possible when we have Nullable.

If you disagree with this assessment please reopen the issue for voting along with a comment on why. Thanks.

comments

bdenham wrote Jun 10, 2010 at 3:04 AM

Without a nullable NumericUpDown control, we cannot use this control for cases, say within a datagrid, where the user has selected multiple rows for editing within a custom popup editor. If the numeric values within those rows are different, we want to display an empty numericUpDown control (with maybe a watermark indicating multiple values). But we still want the numericUpDown control to be editable so that the user can set all the selected values within the datagrid to the same value if desired. I can think of other similar scenarios in which you would want the numericUpDown control to show up blank and not 0.

rentadeveloper wrote Jul 14, 2010 at 12:20 AM

Please reopen this issue.
The NumericUpDown is virtually useless in scenarios where you need to edit Nullable Numeric Fields.
I have a lot of projects where i need to provide the abillity to set an Numeric Field to empty (NULL) because in the domain of the project nullable numeirc fields are often required.

ilektrik wrote Oct 13, 2011 at 1:35 PM

I'm working on NumericUpDown with support for nullable numeric source data (int/int?/float/float? etc). I have some doubts concerning code quality maybe some small corrections are required. Anyway - it seems to work well.

On Saturday I will try to upload the class code and sample solution as well.

ilektrik wrote Oct 15, 2011 at 1:23 PM

I set up the project page on codeplex: http://ilektrik.codeplex.com/
Example project is uploaded but I can't any files under "source code" tab. Probably server needs some time to process the upload.

kkaila wrote May 30, 2012 at 10:02 PM

I need a nullable NumericUpDown for scenarios of filtering data on a datagrid. The ignore value has to be null since all other numeric values are valid in my scenario.

Agree with comments above. This control is useless in a business applications without a nullable component.

Have to reopen this issue.