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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag And Drop

Thread ID:

Created:

Updated:

Platform:

Replies:

48136 Aug 21,2006 10:02 AM UTC Aug 23,2006 08:24 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 21, 2006 10:02 AM UTC

hi!

When i drag a row from a GDBG to the column header or to somewhere else inside the grid, the data in the row is gone!

how do i prevent this happen?

Administrator [Syncfusion]
Replied On August 23, 2006 08:24 AM UTC

Hi Lim,

My apologies for the delay in response.

I have created a sample as per your specification. The sample illustrates the possiblity to Drag and Drop the row in a grid without loosing the data. Please refer to the attached sample and let me know if you are trying something different.

bool isDrop = false;
private void gridDataBoundGrid1_QueryContinueDrag(object sender, System.Windows.Forms.QueryContinueDragEventArgs e)
{
if( e.Action == DragAction.Drop )
{
e.Action = DragAction.Cancel;
this.gridDataBoundGrid1.Binder.BeginEdit();
for(int i = 1; i <= this.gridDataBoundGrid1.Model.ColCount ; i++)
this.gridDataBoundGrid1.Model[RowIndex,i].Text = this.gridDataBoundGrid1.Model[sRowIndex,i].Text;
this.gridDataBoundGrid1.Binder.EndEdit();
isDrop = false;
}
}

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/DragDrop_3f9a100b.zip

Thanks,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;