How to reset RadRating control

2 posts, 0 answers
  1. M. R.
    M. R. avatar
    49 posts
    Member since:
    Dec 2009

    Posted 15 Mar 2012 Link to this post

    Hello,

    Can you please provide a VB.Net method that can reset (or "unrate") the value of a RadRating contol? What I need to achieve is the following:
    When user rates I check the database to see if he didn't previously rate in the past by verifying the user ID. This works fine, I have all necessary code in the Rate event. However, I also need to undo his rating in case he attempts to rate twice.

    Thank you,
    M.R.
  2. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 20 Mar 2012 Link to this post

    Hi,

    Please check the online demo Rating / RadRating in RadGrid. Note that the implemented functionality is similar to the one you want to achieve. The user can rate an item only once then the rating control becomes read-only by setting its property ReadOnly to true.

    You can also use the RadRating's client-side event OnClientRating to cancel the event if a user has already rated. Its functionality is show in the online demo Rating / Client-Side Events.

    I hope this helps.

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top