Print Page | Close Window

Drag & Drop in Tree View - Sub items supported?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=9777
Printed Date: 16 November 2024 at 6:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Drag & Drop in Tree View - Sub items supported?
Posted By: coretech
Subject: Drag & Drop in Tree View - Sub items supported?
Date 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!



Replies:
Posted By: Rafael
Date Posted: 20 March 2008 at 11:27am
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)


Posted By: Rafael
Date Posted: 20 March 2008 at 11:40am
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


Posted By: danpetitt
Date Posted: 18 June 2008 at 1:42am
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?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net