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

Tick- values do not display

6 Answers 180 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 24 Feb 2010, 08:49 PM

I haven't used the slider control before, so hopfully I am missing something simple. First,
using the follwing code, the slider value are not displayed: 

<telerik:RadSlider id="RadSlider1" runat="server" Height="95px"

 

 

ItemType="Tick" Length="300" MaximumValue="5" MinimumValue="1" Value="3" Width="400px" Skin="Windows7" TrackPosition="TopLeft" >

 

 

 

</telerik:RadSlider>


Thanks for you help.

 

6 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 25 Feb 2010, 08:52 AM
Hi Dean Jurecic,
I already answered your support ticket with the same question. I will give the information here as well, so that it is available to all, who might run in the same problem:

In the case ItemType="Tick", the slider control displays tick marks for its SmallChange and LargeChange values. Only the tick marks for the LargeChange values show the value of the slider. By default, the value of the SmallChange property of the slider is 1, which means that in your case, the slider will display a SmallChange tick mark for the following values - 1, 2, 3, 4, 5. On the other hand, the default value of the LargeChange property is 0 - this means that the slider will not display LargeChange tick marks. I suppose what you are trying to achieve is the following:

<telerik:RadSlider ID="RadSlider1" runat="server" Height="95px" ItemType="Tick" Length="300"
    MaximumValue="5" MinimumValue="1" Value="3" Width="400px" Skin="Windows7" TrackPosition="TopLeft"
    SmallChange="1" LargeChange="1">
</telerik:RadSlider>

Please refer to following online demos for more information:


Kind regards,
Tsvetie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 12 Apr 2011, 12:26 PM
Hi,

How can I set these properties from codebehind for a programatically generated Slider?

I have now:

Dim radSlider1 As New RadSlider()
radSlider1.IsSelectionRangeEnabled=true
radSlider1.SelectionStart=2
radSlider1.SelectionEnd=40
radSlider1.MinimumValue=0
radSlider1.MaximumValue=100
radSlider1.LargeChange=10

No value text is shown on the slider

BR,
Marc
0
Niko
Telerik team
answered on 12 Apr 2011, 01:34 PM
Hi Fit2Page,

You appear to be missing the initialization for the following properties -
  1. SmallChange
  2. TrackPosition
  3. ItemType
The code should be pretty straightforward:
radSlider1.SmallChange = 10
radSlider1.TrackPosition = "TopLeft"
radSlider1.ItemType = "Tick"

Hope this helps.
Greetings,
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
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 12 Apr 2011, 02:01 PM
That won't work, I get:

Exception Details: System.FormatException: Input string was not in a correct format.

Source Error:

Line 20: radSlider1.LargeChange=10
Line 21: radSlider1.SmallChange = 10
Line 22: radSlider1.TrackPosition = "TopLeft"
Line 23: radSlider1.ItemType = "Tick"
Line 24: 

Source File: C:\inetpub\wwwroot\insight\texim\solutionsearch.aspx.vb    Line: 22
0
Niko
Telerik team
answered on 12 Apr 2011, 03:28 PM
Hello Marc,

Yes, indeed this code should not work correctly. Please, accept my apologies for the error. This property requires an enumeration value, more precely of the SliderItemType type. Here is the correct initialization:

radSlider1.ItemType = SliderItemType.Tick


All the best,
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
Niko
Telerik team
answered on 12 Apr 2011, 03:31 PM
Hello Marc,

In the last post I forgot to include the TrackPosition initialization as well. Here it is:
radSlider1.TrackPosition = SliderTrackPosition.TopLeft
The issue is the same, the enumeration of type SliderTrackPosition should be assigned to the TrackPosition property.

Greetings,
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.

Tags
Slider
Asked by
Dean
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Niko
Telerik team
Share this question
or