Hi and thanks in advance.
I created a custom control that uses a rad slider with item type set to item. As follows:
I am dynamically adding ticks on the server side. Here is the code:
The problem I am having is that the tick marks are showing once the radslider is rendered on the page. How can I hide these tick marks from showing? My understanding was that when you create an item type slider the tick marks go away, but this is not the case. Any help would be appreciated. I have included a screenshot for reference.
Thanks,
-Justin
I created a custom control that uses a rad slider with item type set to item. As follows:
<td> <telerik:RadSlider ItemType="Item" SmallChange="1" TrackPosition="TopLeft" AutoPostBack="false" ShowDecreaseHandle="false" Width="490" LargeChange="0" OnClientValueChanged="rwc_Input_Slider_ValueChanged" OnValueChanged="radSlider1_ValueChanged" ShowIncreaseHandle="false" MinimumValue="0" MaximumValue="36" runat="server" ID="radSlider1"> </telerik:RadSlider>
</td>I am dynamically adding ticks on the server side. Here is the code:
private void CreateSliderTicks(RadSlider radSlider)
{ int minuteTicks = 6; int hourTicks = 24; int dayTicks = 8; // add minute ticks to the graph for (int i = 0; i < minuteTicks; i++) { RadSliderItem minuteItem = new RadSliderItem(); minuteItem.Value = (i * 10).ToString() + " " + Resources.Units.Minutes; //string testValue = minuteItem.Value.ToString(); //minuteItem.Text = minuteItem.Value.ToString() + " minutes"; radSlider.Items.Add(minuteItem); } // add hour ticks to the graph for (int i = 1; i < hourTicks; i++) { RadSliderItem hourItem = new RadSliderItem(); string units = "";//Resources.Units.Hours; if (i > 1) { units = Resources.Units.Hours; } else { units = Resources.Units.Hour; } hourItem.Value = i.ToString() + " " + units; //string testValue = hourItem.Value.ToString(); radSlider.Items.Add(hourItem); } // add day ticks to the graph for (int i = 1; i < dayTicks; i++) { RadSliderItem dayItem = new RadSliderItem(); string units = ""; if (i > 1) { units = Resources.Units.Days; } else { units = Resources.Units.Day; } dayItem.Value = i.ToString() + " " + units; //string testValue = dayItem.Value.ToString(); radSlider.Items.Add(dayItem); } }
The problem I am having is that the tick marks are showing once the radslider is rendered on the page. How can I hide these tick marks from showing? My understanding was that when you create an item type slider the tick marks go away, but this is not the case. Any help would be appreciated. I have included a screenshot for reference.
Thanks,
-Justin
