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

use OnRowDragStarted to change dragclue

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 09 Apr 2013, 12:02 PM
Hi,

Do you think I can use OnRowDragStarted event to let the dragclue icon change when I hover an area where the clue may be dropped like this demo:

http://demos.telerik.com/aspnet-ajax/treelist/examples/itemsdragdrop/defaultcs.aspx

I tried but I see that OnRowDragStarted has no get_destinationHtmlElement()

Thanks,
Marc

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 12 Apr 2013, 07:28 AM
Hi Marc,

You could achieve your scenario by subscribing to the RadGrid rowDragging event in the GridCreated event as shown below. In the RowDragging function you could access the dragged row and the drop clue and based on your custom logic change\add icon when you are over a specific area.
<ClientSettings>
    <ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
function GridCreated(sender, args)
{
    sender.add_rowDragging(RowDragging);
}
 
function RowDragging(sender, args)
{
    // The drop clue
    var dropClue = sender._dropClue;
 
    // The dragged row
    var draggedRow = sender._draggedRow;
 
    // custom logic
}

All the best,
Antonio Stoilkov
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
Grid
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Antonio Stoilkov
Telerik team
Share this question
or