We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Disabling Multiple cell drag drop in Grid Control

Hi there,
I am usig Drag and Drop functionality provided by Grid Control. But it by default allows me to drag multiple cells. Is there any property available to disable multi cell drag drop? i want to have only single cell drag and drop for my application.

Awaiting your response.

Many Thanks,
Ankit


1 Reply

JJ Jisha Joy Syncfusion Team September 22, 2008 05:07 AM UTC


Hi Ankit,

We appreciate your interest in Syncfusion Products.

Disabling Multiple cell drag drop in Grid Control

This can be achieved by handling the QueryCanOleDragRange event and can check for e.Range.Width and e.Range.Height. Please refer the code:



gridControl1.AllowDrop = true;
gridControl1.QueryCanOleDragRange += new GridQueryCanOleDragRangeEventHandler(gridControl1_QueryCanOleDragRange);

void gridControl1_QueryCanOleDragRange(object sender, GridQueryCanOleDragRangeEventArgs e)
{
if (e.Range.Width >1 || e.Range.Height>1)
e.Cancel = true;
}



Please try this and let me know if this helps.

Regards,
Jisha


Loader.
Live Chat Icon For mobile
Up arrow icon