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

[Solved] No Hand Cursor on Drag and Drop

1 Answer 144 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
terrysmith
Top achievements
Rank 1
terrysmith asked on 07 May 2008, 10:07 PM
In the prior version I'm nearly certain that the mouse cursor was a hand when hovering over node icons or text which have drag enabled. At least we used to have that functionality and now it is not working.

I think this is a bug. Nodes with drag enabled should have a hand cursor and those without should have the default cursor. If you agree can this be fixed in the next service pack?

We are using the Vista skin.

Thanks,
Terry

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 10 May 2008, 10:24 AM
Hello Terry,

Thank you for your feedback.

While we are not sure whether we will include this in the SP, you could use the following javascript to enable such functionality:
function dragDropChangeCursor (sender, eventArgs) 
{ 
    var node = eventArgs.get_node(); 
     
    if (node.get_allowDrag()) 
    { 
        node.get_contentElement().childNodes[2].style.cursor = "pointer"; 
    } 
} 

Just attach the function to the OnClientMouseOver event, namely:
<telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="true" OnClientMouseOver="dragDropChangeCursor"> 
    <Nodes> 
        <telerik:RadTreeNode AllowDrag="false" Text="Root RadTreeNode1" /> 
        <telerik:RadTreeNode Text="Root RadTreeNode2" /> 
        <telerik:RadTreeNode Text="Root RadTreeNode3" /> 
    </Nodes> 
</telerik:RadTreeView> 

If all of your nodes can be dragged and you wish to change the cursor, you could make it much easier using the following line of CSS:
.RadTreeView .rtIn, .RadTreeView .rtImg { cursor: pointer }  


All the best,
Alex
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
terrysmith
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or