Ajax Rating control CurrentRating as double

J

Joe

I want the CurrentRating to be a double instead of an int. I made the
changes in the code but now the stars always fill with 1 more then it should
if the CurrentRating has a decimal value.

I tried to change the RenderContents method too:
int currentRating = Convert.ToInt32(Math.Floor(this.CurrentRating));

But this still doesn't do anything. I can see in the loop below where it is
setting the class that it sets the fill and empty the right number of times
but when the page displays there is one for.

For example if the CurrentRating = 3.2. There will be 4 stars colored in.

Is there another place that this need to be changed as well?

Thanks,
Joe
 
J

Joe

It looks like there were a few places in the .js code that I didn't notice
before that needed a Math.floor();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top