Hello. I tried to bind RadNumericBox to a nullable property and after that the control was not sending any value updates to the property. How could I fix it?
Property type is short?/decimal?. Everything works fine when I replace these types to short/decimal or to double?.
0
Ivaylo Gergov
Telerik team
answered on 23 Dec 2015, 04:27 PM
Hi,
Thank you for your interest.
We will further investigate this issue and I will get back to you as soon as we have any information.
Regards,
Ivaylo Gergov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0
Ivaylo Gergov
Telerik team
answered on 28 Dec 2015, 08:39 AM
Hi,
The RadNumericBox.Value property is of type double? and while the framework can handle the conversion between double? and int for example(RadNumericBox by default handles the conversion between your data type to double?), this is not the case with decimal. In this case you will need a converter tho convert from double? to the desired type.
Here's an example:
public class CConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
var decimalValue = System.Convert.ToDecimal(value);
return decimalValue;
}
}
Let me know should you need further assistance.
Regards,
Ivaylo Gergov
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items