use OnRowDragStarted to change dragclue

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 09 Apr 2013 Link to this post

    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
  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 12 Apr 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top