The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
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 11:28 AM UTC
In the designer, under the ControllerOptions property, uncheck the OleDataSource flag. Or, from code, try
//C#
this.gridControl1.ControllerOptions = GridControllerOptions.All & (~GridControllerOptions.OleDataSource);
''VB.NET
Me.gridControl2.ControllerOptions = GridControllerOptions.All And Not GridControllerOptions.OleDataSource
MWMike WoolleyFebruary 1, 2005 11:30 AM UTC
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 12:43 PM UTC
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;
}
}