Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Rating > RadRating inside Grid Not More than 3 to be selected

Not answered RadRating inside Grid Not More than 3 to be selected

Feed from this thread
  • ARVIN avatar

    Posted on Sep 28, 2011 (permalink)

    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".

    Thanks,
    aRviN.!!

    Reply

  • Posted on Sep 29, 2011 (permalink)

    Hello Arvin,

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

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

    Javascript:
    function OnClientRating(sender, args)
           {
               if (args.get_newValue() > 3)
            {
                alert("you cant select more than 3!!");
                args.set_cancel(true);
            }
        }

    Thanks,
    Shinu.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Rating > RadRating inside Grid Not More than 3 to be selected
Related resources for "RadRating inside Grid Not More than 3 to be selected"

ASP.NET Rating Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]