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


    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,
  2. Slav
    Slav avatar
    1359 posts

    Posted 20 Mar 2012 Link to this post


    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.

    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.
Back to Top