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

Drag and Drop in Hierarchy Grid?

3 Answers 292 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 11 Aug 2010, 07:26 AM
Hi,
Put this into the context of a construction company, I need to get a system running where there is a hierarchy list of current jobs which can be expanded to show a list of machines booked to that job, which can be further expanded to show a list of operators for that machine currently working on that job. This will also have two further tables containing machines and operators which can be dragged onto jobs and machined respectively, this will then update records in a MS SQL database.
I just need to know if this is possible and if so, some guidence on how to make this posssible, as this is the first time I have used Telerik.

Many Thanks in advance,
Dan

3 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 16 Aug 2010, 11:05 AM
Hi Dan,

You can combine RadGrid's Hierarchical Detail Tables and Rows Drag-and-Drop to create a RadGrid that meets your business needs. RadGrid supports various hierarchical binding and loading modes, while for drag-and-drop, you can learn more here. Let us know if any specific questions arise.

Rregards,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ish
Top achievements
Rank 1
answered on 08 Dec 2010, 12:25 PM
I am trying to do something similar except that I am trying to do this with a self referencing grid. The row drop server event is fired and I am confused on how I can determine what level the row was dropped on. Also, the drop position only provides below and above and how do I know if the user wanted to move it as a child of the destination row instead of a sibling?

Basically I would like the user to be able to re-arrange the grid row(s) from any level to any level, and not necessarily only within a level. Any sample/guidance is highly appreciated.

Thanks! 
0
Veli
Telerik team
answered on 08 Dec 2010, 04:51 PM
Hi Ish,

The RadGrid.RowDrop event gives you the target data item and whether the dragged item(s) are dropped above or below the target. They do not provide data as to whether the user intended to reorder the dragged items as siblings or children of the target item. You need to decide this yourself as a convention.

Attached is a test page demonstrating one approach you can take. The convention I used is that the dragged items are always added as children of the destination item. If you need to add siblings - you need to drop over the immediate parent item.

Veli
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Veli
Telerik team
Ish
Top achievements
Rank 1
Share this question
or