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

Drag and drop: styling the dragged item

1 Answer 111 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 21 Jan 2015, 10:11 PM
How do I style the dragged item when using drag-and-drop with a RadTreeList? I am currently doing this by setting the OnItemDragging client event to call a Javascript function, then having that function call args.get_draggedContainer(), then setting the classname for the result, but it seems like there should be a simpler way. Is there a property I can set that will control the CSS class of a dragged item?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 26 Jan 2015, 03:15 PM
Hello Peter,

You can use the following styling:
<style type="text/css">
    .TreeListDraggedRows_Default tr.rtlRSel {
        color: lime;
    }
</style>

Or modify the entire dragged element using javascript per your initial suggestion, similar to this RadGrid sample:
http://www.telerik.com/support/code-library/cancel-row-drag-and-drop-when-esc-key-is-pressed

Hope this helps.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TreeList
Asked by
Peter
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or