You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a rating page and when it appears the first time I can see five values in the array with name "behaviors". However when the page dissapears and appears again the quantity of StarBehavior is duplicated each time I do this.
So, The rating sent by the control is 10,11,12..... (When the rating is between 0-5)
The text was updated successfully, but these errors were encountered:
I have the same issue. When I load with the rating initially. the rating values are correct (0-5). However, reloading the same page increases the rating values by the number of "new" selected stars. In looking at the behaviors collection, it is adding new behaviors to the list for the same group, resulting in 6+ behaviors.
After looking at it some, I added some math to correct the variation. Before the item.Rating is set, I do a loop to reduce by increments of 5 until it's the right range.
while (position > 5)
{
position = position - 5;
}
item.Rating = position;
@BryanSoltis , I tried your solution, but i could see that the controls will still be there if the rating is reseted.
I did following and it works.
StarBehavior.cs added following: public static void ResetStarBinding() { starGroups = new Dictionary<string, List<StarBehavior>>(); }
Then before i load the page i call "StarBehavior.ResetStarBinding();"
This seems to resolve the problem and not adding more controls than there is needed, in my case 5 :)
I know this is old, but issue is still there, i wanted to share my solution with you all :)
I have a rating page and when it appears the first time I can see five values in the array with name "behaviors". However when the page dissapears and appears again the quantity of StarBehavior is duplicated each time I do this.
So, The rating sent by the control is 10,11,12..... (When the rating is between 0-5)
The text was updated successfully, but these errors were encountered: