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

Dragged Item won't show if I bind itemsource to a source data

1 Answer 46 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 21 Jul 2009, 03:10 PM
Hello,
I'm fighting with Drag and Drop but it seems to win!
I've got this strange behavior... I save the dragged item to the DB (I'm implementing a sort of favorites system)
If I bind the listview's itemsource to the data I retrieved from the DB no items are displayed when I drop the item

  private void client_GetFavoritesListCompleted(object sender, IFWebLight.IFPosizioni.GetFavoritesListCompletedEventArgs e) 
        { 
            if (e.Error == null) 
            { 
                lfmv = GetFavoriteModelViewFromWS(e.Result); 
                DragListBox.ItemsSource = lfmv; 
            } 
        } 

If I comment this, everything works fine, but I've no the data from the DB...If I've them uncommented then I refresh I see the data correctly

Thanks in advance

Paolo

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 22 Jul 2009, 02:33 PM
Hi Paolo,

Maybe there is something I am missing here, could you please clarify your scenario:

1. You do not see the item being dragged (the drag cue) or you do not see the item once it is dropped?
2. If you do not see the item being dropped, then could you share your DropInfo handler? I am thinking that the ItemsSource may get replaced.
3. If you are saving and retrieving the item in a single call (or without waiting for the item to be saved to the DB you may find that you are getting the result from the DB without the saved item). What I can suggest there is wait for confirmation that the item is saved before requesting the collection that contains it (I am sorry if this is not what you are doing, I am guessing a bit here).

Regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
DragAndDrop
Asked by
Michele
Top achievements
Rank 2
Answers by
Miroslav
Telerik team
Share this question
or