This is a migrated thread and some comments may be shown as answers.

How to reset RadRating control

1 Answer 148 Views
Rating
This is a migrated thread and some comments may be shown as answers.
M. R.
Top achievements
Rank 1
M. R. asked on 15 Mar 2012, 08:44 PM
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.

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 20 Mar 2012, 10:02 AM
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.
Tags
Rating
Asked by
M. R.
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or