Drag Drop in Desired Location

2 posts, 0 answers
  1. Manas Rastogi
    Manas Rastogi avatar
    21 posts
    Member since:
    Aug 2009

    Posted 31 Aug 2009 Link to this post

    I want to drag and drop controls in desired location within a grid/canvas but these controls get dropped sequentially one below the other.Is it possible if I give multiple grids/canvas as drop locations and drop the control in any one as per my choice(desired location).Or else can such a thing be achieved in any other way.
  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 31 Aug 2009 Link to this post

    Hi Manas Rastogi,

    I am not quite sure that I undesrtood your propblem correclty.

    If the problem is that one item overlaps another, you can use the Canvas.ZIndex attached property to modify the ZIndex (z stacking) of an element. This property only works for elements that are children of one and the same element.

    If want to drop the item in specific Grid Row/Column, then you can do two things:
    1. Calculate where the element will fall and set the Grid.Row and Grid.Column properties. This will only work if you have simpler column / row definitions.

    2. Place dummy items (like borders or rectangles) in the grid where you would like your items to go. Then you can use them for highlighting the drop are and on successful drop you only need to copy the Grid.Row / Grid.Column properties.

    Hopefully this will work in your case,

    All the best,
    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.
Back to Top