Drag Drop Column to other Control

2 posts, 0 answers
  1. Sven Jesper
    Sven Jesper avatar
    1 posts
    Member since:
    Jun 2012

    Posted 13 Mar 2012 Link to this post


    I need to "drag and drop" columns from a gridview to another control; for example a simple text box that just prints the header name when the column is droped on to it. 

    I have mined the posts here and the WinFroms demo, all implementing on the drag and drop service:
      RadDragDropService dragDropService = this.radGridView1.GridViewElement.GetService<RadDragDropService>();
                dragDropService.PreviewDragOver += new System.EventHandler<RadDragOverEventArgs>(dragDropService_PreviewDragOver);
                dragDropService.PreviewDragDrop += new System.EventHandler<RadDropEventArgs>(dragDropService_PreviewDragDrop);

     However, it seems that PreviewDragOver  and PreviewDragDrop  events are fired only when hitting on the listed members here:

    and not a textbox or other generic container.

    My question is: is there anyway i can allow and detect a column drop using some other code OR implement a new control that will implement the radservice

    Thanks in advance.
  2. Jack
    Jack avatar
    2333 posts

    Posted 16 Mar 2012 Link to this post

    Hello Sven,

    Yes, your assumption is correct. Only controls which implement the described interface can benefit from the built-in drag & drop mechanism. In your scenario the best option is to implement OLE drag & drop. You can read more about that in this MSDN article.

    If you have further questions, do not hesitate to ask.
    Kind regards,
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top