Set value

2 posts, 0 answers
  1. Kjell
    Kjell avatar
    196 posts
    Member since:
    May 2011

    Posted 04 Jul 2012 Link to this post

    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?
  2. Slav
    Slav avatar
    1351 posts

    Posted 06 Jul 2012 Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top