RadGalleryItem Drag and Drop

6 posts, 0 answers
  1. Italo
    Italo avatar
    7 posts
    Member since:
    Apr 2011

    Posted 04 Oct 2011 Link to this post

    Before the Q2 2011 SP1 release I was able to drag a RadGalleryItem into a custom user control with the following code. Since SP1, the custom control doesn't reveive any notifications about drag and drop while dragging from an open gallery control. What can I do?

    var item = new RadGalleryItem { Image = elementInfo.Image };
        item.SetValue( RadDragAndDropManager.AllowDragProperty, true );









    Thanks
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Oct 2011 Link to this post

    Hello Italo,

    The RadDragAndDropManager was recently improved and new functionality was added to the control. This might be the root of the issue.

    You can, however, still use the old functionality of the manager, but you'll need to set the following property:
    public MainPage()
    {
        RadDragAndDropManager.ExecutionMode = DragExecutionMode.Legacy;
        InitializeComponent();
    }
    Setting the ExecutionMode property to Legacy will keep the old functionality of the manager and that should fix the issue. Please give ti a try and let me know how it goes.

    However, if this suggestion doesn't help, can you please send us a sample project reproducing the issue so that we can look into it? Thank you in advance.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Italo
    Italo avatar
    7 posts
    Member since:
    Apr 2011

    Posted 08 Oct 2011 Link to this post

    Tina,

    Thanks, that fixed it.

    What’s the consequence of using the legacy mode? Anything I can do to upgrade my code?

    Thanks again,
    Italo

     

  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Oct 2011 Link to this post

    Hello Italo,

    Since Q2 2011 we have introduced DragDropManager which uses similar API and infrastructure as the one of the default WPF drag and drop functionality. That is why if you want to work with RadDragAndDropManager, you need to set the ExecutionMode to Lagacy, thus stating explicitly that you will use its features instead.
     

    Regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Italo
    Italo avatar
    7 posts
    Member since:
    Apr 2011

    Posted 10 Oct 2011 Link to this post

    Maya,

    Thanks for the reply. Can someone please look into why dragging from an expanded ribbon gallery doesn't work? I would prefer not to use legacy code.

    Thanks again,
    Italo
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 12 Oct 2011 Link to this post

    Hi Italo,

    The logic you have implemented so far using RadDragAndDropManager will be executed if you set the ExecutionMode to Legacy as mentioned previously. Otherwise, you could use DragDropManager and its API instead.
    Would you clarify why the code you are using so far does not suit your needs ?  

    Regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner