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

DbValue not working correctly?

1 Answer 88 Views
Rating
This is a migrated thread and some comments may be shown as answers.
David Arnold
Top achievements
Rank 2
David Arnold asked on 24 Feb 2010, 08:02 PM
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(

"analystRating")

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

 

cboAnalystRating.Value = dbReader(

"analystRating")

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

What am I missing here?

 

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 25 Feb 2010, 09:11 AM
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,
Tsvetie
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.
Tags
Rating
Asked by
David Arnold
Top achievements
Rank 2
Answers by
Tsvetie
Telerik team
Share this question
or