or

protected override void CreateChildItems( RadElement parent )
{
base.CreateChildItems( parent );
m_objStackLayoutPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
ImageAndTextLayoutPanel panel = this.GroupBoxElement.Header.Children[2] as ImageAndTextLayoutPanel;
this.GroupBoxElement.Header.Children.RemoveAt( 2 );
this.GroupBoxElement.Header.Children.Add( m_objStackLayoutPanel );
m_objStackLayoutPanel.Children.Add( m_objButton );
m_objButton.Size = new System.Drawing.Size( 16, 16 );
m_objStackLayoutPanel.Children.Add( panel );
}
}
| 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; |
| } |
| grid.GridElement.RowHeight = (int)Math.Floor(this.GridElement.RowHeight * 0.9); |
| grid.GridElement.TableHeaderHeight = (int)Math.Floor(this.GridElement.TableHeaderHeight * 0.95); |