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

SfNumericUpDown control questions\issues

Hi,

Attached project contains a view page with grid view and SfNumericUpDown input control.

Issue 1: On first launch, you can see that "Selected Score" SfNumericUpDown  is empty because the bound value is null. Tapping on the Grid->Name columns should populate corresponding row's Score into the  "Selected Score" control. Clicking on a name with non-null score populates it value correctly, but clicking on a name with null score populates the "Selected Score" with 0. If you look at the bound value in the model, it is null. Not sure why its showing as 0, its suppose to show blank.

Issue 2: I am using ValueChanged event of SfNumericUpDown to do some other operation in View Model, but last input digit isnt available in the model. To see what I am talking about, after you  run the project start typing some numbers in "Selected Score"  control. You can see the value that's in the Model in "Current Score In  Model" label, it will one digit less than in the input control. Lets say if you typed 1234, then the "Current Score In  Model" will show "123". Hope its clear. I am not sure if there is a better event which I can use to trap each input change.

Also is it possible to restrict the number of characters that can be typed in the SfNumericUpDown control, like if I dont want the user to type more than 6 digits how can I achieve that?

Thanks,
Vasanth

Attachment: SfDataGridWithStackedHeaders_a22d36e0.rar

1 Reply

VJ Victory Jessie Selvam D Syncfusion Team May 4, 2015 12:29 PM UTC

Hi Vasanth,

Thank you for using Syncfusion products.

Query #1: Clicking on a name with non-null score populates it value correctly, but clicking on a name with null score populates the "Selected Score" with 0. If you look at the bound value in the model, it is null. Not sure why its showing as 0, its suppose to show blank.
We were able to reproduce the issue and have logged defect report regarding this. The fix for this issue will be included in our upcoming Service pack release which is scheduled in the month of May, 2015.

Query #2: Lets say if you typed 1234, then the "Current Score In Model" will show "123". Hope its clear. I am not sure if there is a better event which I can use to trap each input change.
We have checked the same scenario with Text property in TextBox control, the model property is updated after TextChanged event. So we would suggest you to use Value property directly or args.NewValue to get the updated value.

Query #3: Also is it possible to restrict the number of characters that can be typed in the SfNumericUpDown control, like if I dont want the user to type more than 6 digits how can I achieve that?
MaxLength property for SfNumericTextBox in the template of SfNumericUpDown control can be set to restrict the number of characters that can be typed. We have modified the sample to se MaxLength kindly download it from following link:

Sample: SfDataGridWithStackedHeaders_a22d36e0.zip

Please let us know if you need further assistance on this.

Regards,
Jessie

Loader.
Live Chat Icon For mobile
Up arrow icon