DbValue not working correctly?

2 posts, 0 answers
  1. David Arnold
    David Arnold avatar
    13 posts
    Member since:
    Jul 2009

    Posted 24 Feb 2010 Link to this post

    Hi, if I'm reading the documentation correctly, when my page loads and I prefill the rating control from a database, I should be using something like this:

    cboAnalystRating.DbValue = dbReader(


    The problem is that it's not actually setting anything. If I use this:


    cboAnalystRating.Value = dbReader(


    Then it works, but I get the usual can't convert DBNull to another format message.

    What am I missing here?


  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 25 Feb 2010 Link to this post

    Hello David Arnold,
    In the version of the suite that you use - 2009.3 1314, the DbValue property handled only two case:
    • the value is of type double - sets the value as Value for the rating control
    • the value is not of type double - resets the value of the rating control to 0d.
    For the Beta release 2010.1.216) we updated the DbValue property to handle decimal, float, int, short, ushort, byte, sbyte, long, ulong, uint and bool cases and that is why I suppose, in case you upgrade to the beta release, the problem will be solved. In case my assumption is incorrect, please open a new support ticket and send me a running test project that demonstrates the problem.

    Please note that for the Beta release we changed the type of the Value property of that rating control from double to decimal.

    All the best,
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
Back to Top