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

Slider order changes on drag

1 Answer 32 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 17 Nov 2012, 11:36 PM
Hi

I have a slider defined as follows:

<telerik:RadSlider ID="RadSlider1" runat="server" Value="0" MinimumValue="0" MaximumValue="50" AutoPostBack="true" Height="60px" Width="500px" ItemType="Item" ShowDecreaseHandle="false" ShowIncreaseHandle="false" TrackPosition="TopLeft" Skin="Simple">

</telerik:RadSlider>

I populate a range of values in code behind as follows:

Dim
myExcess As List(Of contractors.excess) = contractors.excess.GetByContractorID(Session("ContractorID"))

 

 For Each Excess In myExcess

 RadSlider1.Items.Add(New RadSliderItem(Excess.ExcessAmount, Excess.ExcessPercent))

 Next

for this example, values witten are
Text = 100, value =0.1
Text = 200, value =0.2
etc. etc

The slider renders as expected, however, after clicking or dragging, the order of the items changes!
It was initially: 100,200,300,400,500

After a drag this may become 100,200,400,500,300

There is no other clientside or server side code so I am puzzled!

Same problem with IE and Chrome

Can anyone help please?

 




 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 21 Nov 2012, 05:57 PM
Hi Paul,

The order of the items in the RadSlider depends on the order of the records in the data-source used for populating the control. I would suggest checking if the order in which the items come from the data-source is always the same and whether the slider is rebound every time a postback occurs.

If you are still having difficulties, please send a simple, runnable page that isolates your case so that I can inspect it locally and provide a concrete solution.

Greetings,
Slav
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Slider
Asked by
Paul
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or