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

Curve tick values for slider

3 Answers 54 Views
Slider
This is a migrated thread and some comments may be shown as answers.
David Sitton
Top achievements
Rank 1
David Sitton asked on 20 May 2011, 08:20 PM
Hi,

I'm currently working on a website that needs a 'price' slider from £100 to £100,000, with two pickers.

Most customers will slide values between £100 - £4,000 with perhaps 5% or less looking in a range up to £100,000

Other than writing custom multipliers when the slider reaches certain points, is there any built-in property of the rad slider which allows you to have 50% of the physical slider represent half the range (e.g. £100 to £4,000) and then the remaining 50% to represent the final half (e.g. £4,100 - £100,000)?

This would be useful for people who want to dynamically represent min and max values in their databases too, especially if they have a few records with exceptionally high or low values.

Cheers!

3 Answers, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 25 May 2011, 12:13 PM
Hi David,

Unfortunately the RadSlider does not support such a scenario. Your best option would be to use ItemType="Item" and create custom items.

Hope this heps.


Best wishes,
Niko
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Chetan
Top achievements
Rank 1
answered on 12 Sep 2011, 09:26 PM
I am having a similar situation.. What i want to accomplish is slider steps of 50, 100, 500, 1000 . I used items as like below.

<telerik:RadSlider ID="slider1" runat="server"  Skin="PBS" EnableEmbeddedSkins="false" MinimumValue="50"
MaximumValue="1000" ItemType="Items" Width="440px"  TrackPosition="TopLeft"
OnClientValueChanged="HandleValueChanged"  >
<Items>
<telerik:RadSliderItem Value="50" Text="50" />
<telerik:RadSliderItem Value="100" Text="100"/>
<telerik:RadSliderItem Value="500" Text="500"/>
<telerik:RadSliderItem Value="1000" Text="1000" />
</Items>     
</telerik:RadSlider>

The problem is I am displaying the value in the text box onclientvaluechanged but the slider1.get_value() is not 50,100,500,1000 but instead is 0,1,2,3
my version is 2010 Q1..
So how do I set the custom increment for radslider? 

Thanks,
Chetan 
0
Niko
Telerik team
answered on 14 Sep 2011, 10:57 AM
Hello Chetan,

Please, try using the get_selectedValue method instead of the get_value. The get_value returns the index of the item, while the get_selectedValue method returns the value associated with this item.

Hope this helps.

Regards,
Niko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Slider
Asked by
David Sitton
Top achievements
Rank 1
Answers by
Niko
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or