Rad Slider Color

2 posts, 0 answers
  1. dolrich
    dolrich avatar
    1 posts
    Member since:
    Apr 2009

    Posted 07 Apr 2009 Link to this post

    Is there a way to change the forecolor dynamically for each radslideritem? I want to change it through javascript. Im using RadControls for ASPNET AJAX Q1 2009.

  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 09 Apr 2009 Link to this post

    Hi Dolrich,
    You can use the following code to achieve the described behavior:
    <telerik:RadSlider ID="uiPortalNavigatorPane" runat="server" Height="56px" ItemType="Item" 
            <telerik:RadSliderItem Text="Item 1" /> 
            <telerik:RadSliderItem Text="Item 2" /> 
            <telerik:RadSliderItem Text="Item 3" /> 
    <script type="text/javascript"
    function OnClientValueChange(sender, args) 
        var selectedItem = sender.get_items()[sender.get_value()]; 
        var itemElement = selectedItem.get_element(); 
        itemElement.style.color = "red"

    All the best,
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
Back to Top