I''d like to prevent any form of drag and drop on the grid. I''ve set AllowDragSelectedCols and AllowDragSelectedRows to false and also tried setting GridOleDataSourceMouseController.HitTestSelectionEdge to 0 and large values, but with no luck. How do I prevent the ''arrow with box'' cursor from appearing?
Thanks once again.
ADAdministrator Syncfusion Team January 27, 2005 06:28 AM
In the designer, under the ControllerOptions property, uncheck the OleDataSource flag. Or, from code, try
this.gridControl1.ControllerOptions = GridControllerOptions.All & (~GridControllerOptions.OleDataSource);
Me.gridControl2.ControllerOptions = GridControllerOptions.All And Not GridControllerOptions.OleDataSource
MWMike WoolleyFebruary 1, 2005 06:30 AM
Thanks. Is it possible to do this on a row-by-row basis, i.e. enable drag and drop from the grid only for the currently selected row?
ADAdministrator Syncfusion Team February 1, 2005 07:43 AM
You can try handling QueryCanOleDragRange and cancel it if you do not want to allow the e.Range to be dragged.
private void gridControl1_QueryCanOleDragRange(object sender, GridQueryCanOleDragRangeEventArgs e)
if(!(e.Range.IsRows && e.Range.Top == this.gridControl1.CurrentCell.RowIndex && e.Range.Height == 1))
e.Cancel = true;