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

2 posts, 0 answers
  1. Michele
    Michele avatar
    426 posts
    Member since:
    Jun 2009

    Posted 21 Jul 2009 Link to this post

    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

  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 22 Jul 2009 Link to this post

    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).

    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.
Back to Top