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

[Solved] Drop column outside of Grid?

2 Answers 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jim
Top achievements
Rank 1
Jim asked on 18 Aug 2009, 02:46 PM

I am attempting to allow the user to drag a column off of a grid and drop it.  My goal is to allow them to "remove" the column from the gridview.  I setup the following in the constructor of my containing usercontrol.

this.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery), false);  
this.AddHandler(RadDragAndDropManager.DropQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDropQuery), false);  
this.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDragInfo), false);  
this.AddHandler(RadDragAndDropManager.DropInfoEvent, new EventHandler<DragDropEventArgs>(OnDropInfo), false);  
 

Of interest is I do get a drag query when I drag, but it appears that this is dragging my usercontrol and not the column. I would have liked to get a DropQuery.

Is there a way to figure out that a Column has been dragged out of the grid (which i would interpret as a 'remove column')?

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 19 Aug 2009, 03:27 PM
Hello Jim,

Currently that is not possible, but there is a workaround. I have prepared a sample project in which a column header has a little close button (the same as the one you see in the group panel items) that removes the column. I hope this helps.

Best wishes,
Ross
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.
0
Jim
Top achievements
Rank 1
answered on 19 Aug 2009, 03:28 PM
Nice idea!! Thanks Ross, you guys are awesome :)
Tags
GridView
Asked by
Jim
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Jim
Top achievements
Rank 1
Share this question
or