Dear,
I have a question regarding drag & drop on a grouped GridView.
The drag & drop functionality (drag & drop between two GridViews) works but now I want to drag on the header of a group.
I need to get the ID or text of the header group.
Thanks in advance!
I have a question regarding drag & drop on a grouped GridView.
The drag & drop functionality (drag & drop between two GridViews) works but now I want to drag on the header of a group.
I need to get the ID or text of the header group.
| private void gridAssigned_DragDrop( object sender, DragEventArgs e ) { |
| if ( e.Data.GetDataPresent( typeof( GridViewDataRowInfo ) ) ) { |
| // dropped on which group? |
| // need ID or text... |
| GridViewRowInfo droppedDriver = GetRowAtPoint( gridAssigned, gridAssigned.PointToClient( new Point( e.X, e.Y ) ) ); |
| // row I'm dragging |
| GridViewDataRowInfo draggedInfo = ( GridViewDataRowInfo )e.Data.GetData( typeof( GridViewDataRowInfo ) ); |
| } |
| } |
| private GridViewRowInfo GetRowAtPoint( RadGridView grid, Point location ) { |
| RadElement element = grid.ElementTree.GetElementAtPoint( location ); |
| // headercells are for grouping |
| if ( element is GridHeaderCellElement ) { return null; } |
| if ( element is GridCellElement ) { return (( GridRowElement )element).RowInfo; } |
| return null; |
| } |
Thanks in advance!