Is this possible?

5 posts, 1 answers
  1. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 24 Dec 2012 Link to this post

    This is not life or death but I was wondering if it was possible to control the orientation of individual ticks on a RadSlider.  (The RadSlider itself has to be oriented horizontally.)

    For example, I have one displaying a range of years so instead of displaying '2012' I'd like it to display
    2
    0
    1
    2.

    Thanks.
  2. Misho
    Admin
    Misho avatar
    129 posts

    Posted 26 Dec 2012 Link to this post

    Hi,

    This behavior could be achieved by adding <br /> tags after each character inside the Text property value of the RadSliderItem in the following way:

    <telerik:RadSlider ID="RadSlider_Items" runat="server" ItemType="item" Width="350px"
          Height="70px"  TrackPosition="TopLeft" >
          <Items>
              <telerik:RadSliderItem Text="2<br />0<br />1<br />2" Value="1" CssClass="verticaltext"></telerik:RadSliderItem>
              <telerik:RadSliderItem Text="2<br />0<br />1<br />3" Value="1" CssClass="verticaltext"></telerik:RadSliderItem>
          </Items>
      </telerik:RadSlider>




    Regards,
    Misho
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 26 Dec 2012 Link to this post

    Excuse me but I have very little CSS experience. 

    Simply inserting <br/>s does not work.  I've looked through every single slider demo and I cannot find this 'verticaltext' class. Where is it documented?

    For that matter is there any place in your documentation that clearly documents Telerik CSS?  So far I can't find it.
  5. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Dec 2012 Link to this post

    Hi,

    You can align the text using br tags without using the CSS class. Attached is the screenshot.
    aspx:
    <telerik:RadSlider ID="RadSlider_Items" runat="server" ItemType="item" Width="350px"
                Height="70px" TrackPosition="TopLeft">
                <Items>
                    <telerik:RadSliderItem Text="2<br />0<br />1<br />2" Value="1"></telerik:RadSliderItem>
                    <telerik:RadSliderItem Text="2<br />0<br />1<br />3" Value="1"></telerik:RadSliderItem>
                </Items>
            </telerik:RadSlider>

    Thanks,
    Princy.
  6. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 22 Jan 2013 Link to this post

    Thanks.  After a bit of hacking I was able to get it work.

    (Then we decided there wasn't enough room for vertically oriented labels....)
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017