This is a migrated thread and some comments may be shown as answers.

Spin Up and Spin Down Hyperlinks

5 Answers 94 Views
Input
This is a migrated thread and some comments may be shown as answers.
Mike Kacos
Top achievements
Rank 1
Mike Kacos asked on 15 Apr 2010, 06:56 PM
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

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Apr 2010, 06:37 AM

Hi Mike,

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

-Shinu.

0
Mike Kacos
Top achievements
Rank 1
answered on 16 Apr 2010, 11:45 AM
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. 
0
Dimo
Telerik team
answered on 19 Apr 2010, 02:27 PM
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.
0
Mike Kacos
Top achievements
Rank 1
answered on 19 Apr 2010, 04:27 PM
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.
0
Accepted
Dimo
Telerik team
answered on 19 Apr 2010, 04:49 PM
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.
Tags
Input
Asked by
Mike Kacos
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mike Kacos
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or