Spin Up and Spin Down Hyperlinks

6 posts, 1 answers
  1. Mike Kacos
    Mike Kacos avatar
    28 posts
    Member since:
    Sep 2009

    Posted 15 Apr 2010 Link to this post

    Hi,
       I just used the RadNumericTextBox for the first time, and I love the spin (up and down arrow) buttons, but I don't want to display the "Spin Up" and Spin Down" hyperlinks.  Is there a way to shut these off?  I can't seem to find it. 

    Thanks,
    -Mike
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Apr 2010 Link to this post

    Hi Mike,

    Set the ShowSpinButtons property of the RadNumericTextBox to "false" in order to hide the spin buttons.

    -Shinu.

  3. Mike Kacos
    Mike Kacos avatar
    28 posts
    Member since:
    Sep 2009

    Posted 16 Apr 2010 Link to this post

    Sorry Shinu, I thought I was clear.  I WANT the up and down arrows, I don't want the two hyperlinks that appear that say "Spin Up" and "Spin Down".  When I set the ShowSpinButtons property to false the hyerlinks dissapear but so do the up and down arrows. 
  4. Dimo
    Admin
    Dimo avatar
    8482 posts

    Posted 19 Apr 2010 Link to this post

    Hello Mike,

    I am afraid I do not understand why and what exactly are you trying to achieve, but here is how to remove the spin buttons' content (the Spin Up / Spin Down text).

    You can remove the hyperlinks completely, as the arrows need some HTML element in order to be displayed. Replacing the hyperlinks with some other element will also be cumbersome, because they have event handlers attached and some CSS styles applied, which work only for "a" elements.


    <%@ Page Language="C#" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     
    <head runat="server">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadControls</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
     
    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ShowSpinButtons="true">
        <ClientEvents OnLoad="RemoveSpinText" />
    </telerik:RadNumericTextBox>
     
    <script type="text/javascript">
     
    function RemoveSpinText(sender, args)
    {
        $get(sender.get_id() + "_SpinUpButton").innerHTML = "&nbsp;";
        $get(sender.get_id() + "_SpinDownButton").innerHTML = "&nbsp;";
    }
     
    </script>
     
    </form>
    </body>
    </html>


    All the best,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Mike Kacos
    Mike Kacos avatar
    28 posts
    Member since:
    Sep 2009

    Posted 19 Apr 2010 Link to this post

    I think either I'm still not being clear, or we have a misunderstanding of what's going on.  In my screen, I added a NumericTextBox with ShowSpinButtons = true.  I appear to be getting several elements (The text box, arrors, AND hyperlinks).  I don't want the hyperlinks. I've attached a picture with text to show what I want to do.  If you are saying I need to right javascript to remove the hyperlinks yet keep the arrows, I would say this seems like a defect, no?  Please see attachment.
  6. Answer
    Dimo
    Admin
    Dimo avatar
    8482 posts

    Posted 19 Apr 2010 Link to this post

    Hi Mike Kacos,

    Let me throw some more light on the RadNumericTextBox rendering.

    The spin up/down buttons are rendered as <a> elements with <span> elements inside. The "spin up/down" text is inside the <span> elements. The <a> elements have a negative text-indent CSS style, which hides the text, so that it is not seen at all. If you see that text labels, this means that there are some styles on the page, which show them back and we will need a runnable demo to investigate why this happens.

    The up/down arrows, which you see, are background images of the <a> elements.

    Greetings,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top