Setting a text value on the drag handle in the slider

2 posts, 0 answers
  1. CodeMonster
    CodeMonster avatar
    1 posts
    Member since:
    Aug 2012

    Posted 13 Aug 2012 Link to this post

    Can you tell me if (and how) it is possible to set a value within the drag handle on the slider. The demos and examples I have seen show the drag handle being very thin and give the ability to add a tooltip, but no text within the drag button itself.

  2. Marin Bratanov
    Marin Bratanov avatar
    5897 posts

    Posted 14 Aug 2012 Link to this post


    Text cannot be added to the drag handle because it is designed to be small enough to avoid obscuring the interface. You can override these values with some CSS and show text there (the text can be added via JavaScript), yet I would advise against doings this as it may break the control's functionality.

    Nevertheless, here follow the snippets:
        text-indent: 0px !important;
        font-size: 12px !important;
        overflow: visible !important;
    function pageLoad()
        var dragHandle = $find("<%=slider1.ClientID %>").get_dragHandles()[0];
        dragHandle.firstChild.innerHTML = "Drag";
    where slider1 is the server ID of the slider that you want to modify.

    You can make the CSS selectors heavier by adding our own classes so that they do not affect all sliders on the page and you can change the font size, color and content as you see fit.

    Marin Bratanov
    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.
Back to Top