This is a migrated thread and some comments may be shown as answers.

When writing a value without using the up and down arrows, how can I get the current value?

3 Answers 52 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Pinho
Top achievements
Rank 1
Pinho asked on 29 Sep 2009, 07:33 PM
Hi,

 you have inputValue and textbox properties in a non-public manner, and these two properties contain the value that I need.

 Even using reflection I'm not able to reach those variables, is there any way to get this value?

Thanks,

Luis Pinho

3 Answers, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 30 Sep 2009, 09:49 PM
Hello Luis,

Would you explain us the scenario in which you need the input values of a RadNumericUpDown? Maybe this is a case that we have missed and one that will be also useful to other people. We can create a special property or event in order to get this information in case it's a working scenario in which there is no other alternative. Thank you for collaborating and we look forward to receiving your answer.

Regards,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Pinho
Top achievements
Rank 1
answered on 01 Oct 2009, 02:07 PM
Sure,

 I'm using a RadNumericUpDown as an editor for a cell inside a RadGridView.

 Unfortunately, the RadNumericUpDown "value changed" event is launched after the "cell edit end" event is launched, so, when the value is checked for the grid, it still contains the old value.

 What I had made ("quick and dirty solution") was, on key up, I would get the current value and set the value to the cell, but this would not work because the value is not the value that I have written. I then noticed that the inputValue had the values that I've typed, but I couldn't get access to it, not even using reflection.

 Note: These problems only occur when I write values "by hand" not using the up down arrows

Thanks,

Luis Pinho
0
Hristo Borisov
Telerik team
answered on 03 Oct 2009, 08:44 PM
Hi Luis,

Instead of using the key up even you can get the binding expression of the RadNumericUpDown and force it to update its source. In this way you will control how and when the value will be updated. Here is an example of how to achieve this using our controls. If you still experience problems, please get back to us. Thank you for contacting us.

All the best,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
NumericUpDown
Asked by
Pinho
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
Pinho
Top achievements
Rank 1
Share this question
or