RadNumericTextBox Value as Decimal

2 posts, 0 answers
  1. Craig Ennis
    Craig Ennis avatar
    1 posts
    Member since:
    Jun 2009

    Posted 02 Sep 2011 Link to this post

    Hi,

    I'm trying to get the Value property to be Decimal instead of Double.
    I tried changing the DataType="System.Decimal" with no results.

    Any ideas?

    Thanks.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Sep 2011 Link to this post

    Hello Craig,

    This is an expected behaviour.RadNumericTextBox internally uses type Double regardless of the DataType setting.Whatever the value type you assigned, it will be parsed to double,so it can't return decimal or another type.
    DataType
    property determines what will be the data type that comes from DbValue property. So you will always have to convert the value into Decimal. There is no way to use it directly.

    Thanks,
    Princy.
Back to Top