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

Syncfusion GridDataControl

Hi,

Is there any way to get the Drag and Drop features in Syncfusion GridDataControl please?

For example, we assume there is 20 rows and i will drag the Row 15 and want to drop at Row 1. Then the scroll will go up accrodingly mouse movement to Row 1.

Please help.

Thanks.


1 Reply

DM Deenadhayalan M Syncfusion Team June 27, 2011 09:46 AM UTC

Hi Than,

Sorry for the inconvenience caused.

Currently, Our GridDataControl doesn't support for Drag and drop the rows. We can drag and drop the columns. But you can achieve your requirement by setting the code snippets as follows,

private void Button_Click(object sender, RoutedEventArgs e)
{
if (this.datagrid.Model[20, 0].CellValue.ToString() == "Kevin")
{
//Moving the last item to firstposition in the collection.
Collection.Move(19, 0);

//current cell will be set at 1st position here
this.datagrid.Model.CurrencyManager.CurrentCell.MoveTo(1, 2);

//this method used to bring the current cell in to view by scrolling.
this.datagrid.Model.CurrencyManager.CurrentCell.ScrollInView();
}
}

We have prepared a sample based on this. Please find the sample in the following location.

Please let us know if this helps.

Regards,
Deenadhayalan



GDC_MoveRow_a1002cf0.zip

Loader.
Live Chat Icon For mobile
Up arrow icon