Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Slider > RadSliderItem text not showing on RadSlider

Not answered RadSliderItem text not showing on RadSlider

Feed from this thread
  • Goran avatar

    Posted on Oct 26, 2011 (permalink)

    Hi

    I use the RadSlider. I programicly from code behind put the items in the RadSlider. The thing is that i put too many items and the text is not shown, it's like "...", you can see it in the attachment. I put the tool tip but i also want to show the text.

    In the code i tried this
    for (double minute = 0; minute <= minutes; minute = minute + 15)
                {
                    RadSliderItem radSliderItem;
                   if (((int)minute) % 60 == 0)
                   {
                       radSliderItem = new RadSliderItem(workHoursStartDate.ToString("HH:mm"), minute.ToString());
                        radSliderItem.ToolTip = workHoursStartDate.ToString("HH:mm");
                    }
                    else
                    {
                        radSliderItem = new RadSliderItem("", minute.ToString());
                       radSliderItem.ToolTip = workHoursStartDate.ToString("HH:mm");
                    }
                    sliderTimeOffSlider.Items.Add(radSliderItem);
                    workHoursStartDate = workHoursStartDate.AddMinutes(15);
                }

    i thought that if i don't put text on all items, that the text will be shown on those that have.
    Before that the code was like this
    for (double minute = 0; minute <= minutes; minute = minute + 15)
                {
                    RadSliderItem radSliderItem;
                    radSliderItem = new RadSliderItem(workHoursStartDate.ToString("HH:mm"), minute.ToString());
                    radSliderItem.ToolTip = workHoursStartDate.ToString("HH:mm");               
                    sliderTimeOffSlider.Items.Add(radSliderItem);
                    workHoursStartDate = workHoursStartDate.AddMinutes(15);
                }

    I have pictures in the attachment from both cases.

    So  do you have solution so i can show the time on the radSlider and not just on the tool tip

    Regards,
    Goran
    Attached files

    Reply

  • Slav Slav admin's avatar

    Posted on Oct 28, 2011 (permalink)

    Hi Goran,

    Please note that the text of the items isn't displayed because there isn't enough space. My suggestion is to set enough width to the RadSlider so that the text of the items can fit or to use the RadToolTip control in order to show the value of the item's ToolTip propery while dragging the handlers. The latter approach is implemented in the attached sample page. You can use it as a reference to incorporate the functionality, should you choose this solution.

    Kind regards,
    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
    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Slider > RadSliderItem text not showing on RadSlider
Related resources for "RadSliderItem text not showing on RadSlider"

ASP.NET Slider Features  |  Documentation   |  Demos  |  Telerik TV   |  Self-Paced Trainer  |  Step-by-step Tutorial  ]