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

Display Stars That Are Selected Only

1 Answer 28 Views
Rating
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 29 Jan 2014, 09:16 PM
I have a RadGrid that has a radrating control.  That column is readonly.  I am wondering if you can point me in the direction of displaying only the stars that are selected.

Example:



Here I am wondering if we could get it to display where ABC Bank would still show all 5 stars, ABC Company would only show 3.5, and there wouldn't be anything in the column for ABC Owner.

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 30 Jan 2014, 09:37 AM
Hello Christian,

Your best option is to force the background image of the unselected stars to be a transparent image. What you could do is rely on the sprites that come with each skin and just change the background-position of the elements that carry the background image. Here is a sample implementation for the Default skin:
.RadRating ul li a {
    background-position: 0 -18px;
}
 Please, note that this will only work when the Rating controls is in ReadOnly="true" state, which as far as I understand is exactly your case.

Hope this helps.

Regards,
Niko
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Rating
Asked by
Christian
Top achievements
Rank 1
Answers by
Niko
Telerik team
Share this question
or