Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Drag & Drop results in "Getting AllowedDropLocation

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
WolfenSteed



Joined: 15 Feb 2006
Posts: 7
Location: San Diego

PostPosted: Tue Feb 21, 2006 7:17 pm    Post subject: Drag & Drop results in "Getting AllowedDropLocation Reply with quote

I am having trouble with some of the drag features of the virtual tree.
When I am in the Virtual Tree Editor and I try to drag a column (to reposition it) I get a "Getting AllowedDropLocation" modal dialog box. I have to hit the enter key to hide this dialog box because the mouse cannot click the "ok" button. The same thing started happening to my project when I added the GetAllowedRowDropLocations event handler. I seems to happen between the GetAllowedRowDropLocations and the GetRowDropEffect events.
??? help
_________________
Walt :)
Nothing is too small to know, and nothing is too big to attempt.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Feb 21, 2006 11:52 pm    Post subject: Reply with quote

That's very strange. We don't have any code that shows a modal dialog and none that contains that string. The columns editor also doesn't use Virtual Tree (the bindings editor does). Have you searched your own code for this dialog? Even if you had overriden the GetAllowedDropLocation method and showed the dialog I would not expect it to be displayed from within the VirtualTree editor as this uses the original VirtualTree class to display the bindings.

Maybe you could post the actual image of the dialog displayed.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
WolfenSteed



Joined: 15 Feb 2006
Posts: 7
Location: San Diego

PostPosted: Wed Feb 22, 2006 7:07 pm    Post subject: Drag & Drop Reply with quote

The error was coming from our code. We had stubbed the code while trying to troubleshoot some drag and drop problems. We have been having trouble draging an object and dropping it on another object with a different parent type. That is, if an object (lets say subClass1) is a child of another object of the same type (subClass1), we are unable to drop it onto an object of type subClass2. The arrow shows up as the DropNone.ico, however, if the object is already a child of a subClass2 object, it can be dropped onto any subClass2 object.
Is there any limitation that you know of that would prevent dropping to a different type of object?
Hope that made sense.
Thanks for the help.
_________________
Walt :)
Nothing is too small to know, and nothing is too big to attempt.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Feb 22, 2006 10:06 pm    Post subject: Reply with quote

I assume that you are using ObjectBindings with the inbuilt drag and drop support - is that right? The Object Bindings determine what the allowable drop locations are by looking at RowBinding associated with both the rowbeing dropped and the target row.

To be able to drop an row on another the target rows parent must use the same RowBinding as the dragged rows parent. You can change the allowable locations by handling the GetAllowedRowDropLocations event yourself eg

Code:

Private Sub VirtualTree_GetAllowedRowDropLocations(ByVal sender As Object, ByVal e As GetAllowedRowDropLocationsEventArgs) Handles VirtualTree.GetAllowedRowDropLocations, VirtualTree1.GetAllowedRowDropLocations
    Dim dropRows As Row() = e.Data.GetData(GetType(Row()))
    If Not dropRows Is Nothing Then

    ' determine if you want to allow the given rows to be dropped on e.Row

    End If
End Sub


You may also need to handle the RowDrop event to then actually perform the drop.

Note that the next minor release will fix some issues with ObjectBinding drag and drop. It will prevent you dropping a parent onto one of its children or grandchildren.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group