Hi Jeff,
Thank you for your interest in Syncfusion products.
Your mentioned requirement can be achieved by handling the Tablecontrol_mouseUp and TableControl_MouseDown events in GridGroupingControl. The TableControl_MouseDown is used to catch the HeaderColumn and that retrieved column is removed by calling the Tablecontrol_mouseUp whether the mouse pointer is not in the column header.
GridColumnDescriptor col = new GridColumnDescriptor();
void TableControl_MouseDown(object sender, MouseEventArgs e)
{
GridTableControl tableControl = sender as GridTableControl;
GridTableCellStyleInfo style = (GridTableCellStyleInfo)tableControl.PointToTableCellStyle(new Point(e.X, e.Y));
Point pt = tableControl.PointToClient(Control.MousePosition);
if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.ColumnHeader)
{
col = style.TableCellIdentity.Column;
}
}
void TableControl_MouseUp(object sender, MouseEventArgs e)
{
GridTableControl tableControl = sender as GridTableControl;
GridTableCellStyleInfo style = (GridTableCellStyleInfo)tableControl.PointToTableCellStyle(new Point(e.X, e.Y));
Point pt = tableControl.PointToClient(Control.MousePosition);
if (style.TableCellIdentity.DisplayElement.Kind != DisplayElementKind.ColumnHeader && col!=null)
{
this.gridGroupingControl1.TableDescriptor.VisibleColumns.Remove(col.ToString());
}
col = null;
}
Please refer the sample link which allows user to drag column from GridGroupingControl to remove from table.
http://help.syncfusion.com/support/samples/Grid.Windows/8.2.0.18/F94064.zipPlease let me know if you have any further concerns
Regards,
Christopher K.