Drag & Drop in Tree View - Sub items supported? |
Post Reply |
Author | |
coretech
Newbie Joined: 03 March 2008 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 03 March 2008 at 9:32am |
Hi. I have designed a report control that supports parent-child relationships (i.e. a tree) with drag & drop enabled. Drag & drop with top-level items works well but I am unable to drop an item into a sub item position.
For example, when I have the following items/hierarchy: Row1 Row1,1 Row1,2 Row1,3 Row2 Row3 When I drag Row3 to between Row1,1 and Row1,2 and release, it is dropped into Row2 - not into Row1,2 as expected. Is this a bug? How can I work around it? I am using toolkit version 11.2.1. Thanks! |
|
Rafael
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 28 |
Post Options
Thanks(0)
|
You will need to catch the DropRecordsEx event and get the record you dragged from the Records param and you know where you dropped it from the TargetRecord and Above Params.
Then add the record you dragged as a child to the right target record (which probably will not be in TargetRecord param, but the record above)
|
|
Rafael
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 28 |
Post Options
Thanks(0)
|
Actually you will need to add the dragged record as the child of row 1 not row 1,1 to have the affect your looking for
|
|
danpetitt
Senior Member Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
|
But DropRececords doesnt have any information about where you have come from nor where you are now, so how would you do it?
As far as I can see, you need to completely write your own when this ought to be covered by default in the base class ... if you have tree view, then of course you want to drag into the children and not just top level as its broken for everybody in its current state. Could this be resolved by Codejock? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |