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

Set value

1 Answer 39 Views
Rating
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 04 Jul 2012, 12:56 PM
I try to set value to RadRating using variabel <%= 5%>
<telerik:RadRating ID="rrBarnDia" Value='<%=5%>' Precision="Exact" Skin="Sitefinity" ReadOnly="true" Runat="server" />

But have error:
Cannot create an object of type 'System.Decimal' from its string representation '<%=5%>' for the 'Value' property.
What do i wrong?

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 06 Jul 2012, 05:05 PM
Hello Kjell,

When setting a specific value for the RadRating control, please use the following setup:
<telerik:RadRating ID="rrBarnDia" Value="5" Precision="Exact" Skin="Sitefinity"
    ReadOnly="true" runat="server" />

Keep in mind that the rating control accepts values of type decimal so you should convert it if you want to set values of another type.

Regards,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Rating
Asked by
Kjell
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or