Splitting percentage between X rows
I have a table with X elements, each row has a TrackBar (0-100 value) and i need to split the remaining percentage between the next trackbars.
eg. 4 rows, i set 70% at the first, other trackbars will be 10%.
4 rows, i set the 2nd at 20%, the remaining two will be 5%.
I am developing in ASP.Net WebForms. The problems are: OnValueChanged event i get the previosu value, not the one i just moved the handle to.
After setting the other TrackBars' value, these will trigger an OnValueChanged event.
The bigger issue is to move in the PostBack steps. Could anyone suggest me a way to do so?
3 Replies
can you provide us either your code or a stripped down example for what you want? Are the number of tackbars that you need to split the value of dynamic or is there a fixed number? how do you want to split it when you cannot evenly split the remainder? etc.
Pastebin
ASPxTrackBar trk = (ASPxTrackBar)sender; Gri...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
So far the event triggers for every TrackBar i change the value to. On first execution the trk.Value is the previous one, not the new one i moved the handle to.
Percentage split can be done in anyway, it can be approximate.
The gridview elements are activities, and given a certain time (eg. 2h), i have to split the time between them in percentage. So if i move the first trackbar, the others need to adapt