Ajax Rating control CurrentRating as double

Ajax Rating control CurrentRating as double

am 22.12.2007 23:39:59 von 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

Re: Ajax Rating control CurrentRating as double

am 23.12.2007 05:21:21 von joe

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

"Joe" wrote in message
news:%230cHzuORIHA.3516@TK2MSFTNGP02.phx.gbl...
>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
>