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

remove hover selected

7 Answers 311 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 17 Mar 2009, 04:35 PM
Hi,
how can i stop the nodes in my treeview from being highlighted when the mouse rolls over.

I have seen the following suggestion:http://www.telerik.com/community/forums/aspnet-ajax/treeview/disabling-styles-hover-and-selected.aspx

This is not what I want. I want to remove the class switch rather than alter the class behaviour.

How can I prevent any switching of stylesheet classes when the mouse hovers over the node.

7 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 18 Mar 2009, 01:48 PM
Hello ali,

You can call the unhighlight() method of the node when the mouse is over it:

<telerik:RadTreeView ID="RadTreeView1" runat="server"  
    OnClientMouseOver="onMouseOver" 
    Skin="Vista"
    <Nodes> 
        <telerik:RadTreeNode Text="Node1"></telerik:RadTreeNode> 
        <telerik:RadTreeNode Text="Node2"></telerik:RadTreeNode> 
        <telerik:RadTreeNode Text="Node3"></telerik:RadTreeNode> 
    </Nodes> 
</telerik:RadTreeView> 
<script type="text/javascript"
    function onMouseOver(sender, e) 
    { 
        e.get_node().unhighlight(); 
    }    
</script> 

I hope this helps.

Greetings,
Veselin Vasilev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ali
Top achievements
Rank 1
answered on 18 Mar 2009, 02:21 PM
Hi,
That isnt quite what I want. My problem is that I want nothing to happen when the mouse is rolled over.
The solution you have described will only remove the highlighting once it has been placed on the node.
I need it to work so that there is no highlighting in the first place.

The reason is that there are .net controls on the page onto which Im placing the treeview and when the mouse moves over the treeview the entire page keeps flickering. Hence the need for nothing to happen on the mouseover.


0
Atanas Korchev
Telerik team
answered on 18 Mar 2009, 03:02 PM
Hi ali,

We can tweak the treeview skin so the hover style looks as the default one. We cannot disable the hover style applying altogether. If this is a feasible workaround please let us know which skin you are using and we would do the needful.

Regards,
Albert
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Thomas Salt
Top achievements
Rank 1
answered on 19 Jan 2010, 01:10 PM
I've used the following ARTICLE to use the Q3 2008 skins for my treeview.  However, the hover style still changes on mouse over.  Is applying the javascript shown here the only way to remove this mouse over style?

Thank you,
0
Yana
Telerik team
answered on 19 Jan 2010, 01:35 PM
Hello Thomas,

Please add the following css styles to your page in order to remove hover and selected style of the treeview:

.RadTreeView .rtHover .rtIn,
.RadTreeView .rtSelected .rtIn {
   background: none !important;
   border: none !important;
   padding: 4px 3px 3px !important;
}

Best regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John
Top achievements
Rank 1
answered on 04 Jan 2012, 12:46 AM
I am using a RadTreeview (ASP.NET Ajax version 2011.2.915.40) and I want the hyperlink 'hand' icon to not show when a node is hovered. I have successfuly implemented the style below:

 .RadTreeView .rtHover .rtIn
        {
           background: none !important;
           border: none !important;
           padding: 4px 3px 3px !important;
           background-image: none !important;
        }

and this removes the highlight color when nodes are hovered.

I really need to find a way to allow the mousepointer to remain the default arrow when the control is hovered. I've noticed that the hand appears as soon as the mouse enters the TreeView control - even if a node is not being hovered.

How can I do this?
0
Plamen
Telerik team
answered on 04 Jan 2012, 05:51 PM
Hello,

You could try the following CSS:

.rtPlusHover,.rtMinusHover
  {
     cursor:default!important;
  }

Regards,
Plamen Zdravkov
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
Tags
TreeView
Asked by
ali
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
ali
Top achievements
Rank 1
Atanas Korchev
Telerik team
Thomas Salt
Top achievements
Rank 1
Yana
Telerik team
John
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or