RadRating inside Grid Not More than 3 to be selected

2 posts, 0 answers
  1. Arun
    Arun avatar
    2 posts
    Member since:
    Sep 2011

    Posted 28 Sep 2011 Link to this post

    Hello Telerik,

    I have RadRating inside my grid,my item count is 1.i need a condition like only out of the say 10 fields that are showing only 3 needs to be set as rated,if the 4th one is rated,then it sholud show a message "you cant select more than 3".

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Sep 2011 Link to this post

    Hello Arvin,

    You could attach the OnClientRating event and there you can check for the selected value and cancel the event accordingly.

    <telerik:GridTemplateColumn HeaderText="Average Vehicle Rating">
             <telerik:RadRating ID="RadRating1" runat="server" AutoPostBack="true" OnClientRating="OnClientRating"  />

    function OnClientRating(sender, args)
               if (args.get_newValue() > 3)
                alert("you cant select more than 3!!");

Back to Top