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

GridControl Custom Drag and Drop

Thread ID:

Created:

Updated:

Platform:

Replies:

99908 Jun 17,2011 02:55 PM UTC Jun 27,2011 07:11 AM UTC WinForms 1
loading
Tags: GridControl
brandon moody
Asked On June 17, 2011 02:55 PM UTC

I am new to this grid control and I'm working to create a custom D&D function. This grid will have "boxes" of data, and when I select the Header of one of these boxes, I should be able to drag and drop the box to another location on the grid. Currently i'm able to do this using the mouse events, but I would like to use the DragOver and DragDrop events so the user is aware he is dragging.

I currently have DragOver and DragDrop implemented, but when I drag the cell to another location I keep getting the "Not Allowed" cursor when I pause the mouse, when the mouse is in motion it shows the "Move" cursor.

The drag movement will not be the normal OLE move as this grid is refreshed off a custom data source. I receive this exception when I let go out the mouse during the drag. Perhaps a default D&D functionality of the grid is interfering with my custom events ? Any help is appreciated.

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: rowIndex
at Syncfusion.Collections.SFTable.set_Item(Int32 rowIndex, Int32 colIndex, Object value)
at Syncfusion.Windows.Forms.Grid.GridRowCollection.set_Item(Int32 rowIndex, Int32 colIndex, GridStyleInfoStore value)
at Syncfusion.Windows.Forms.Grid.GridData.set_Item(Int32 rowIndex, Int32 colIndex, GridStyleInfoStore value)
at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly)
catched at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly) in :line 0


Christopher Issac Sunder K [Syncfusion]
Replied On June 27, 2011 07:11 AM UTC

Hi Brandon,

Thank you for your interest in Syncfusion products.

I have implemented the Drag and Drop functionality within the grouped range (colored block). The saveCellInfo event is handled for saving the dropped items to data source. The formula cells in last 2 columns are applied. The grouped range has been defined from a range named ‘OverallRange’. GetCells() and SetCells() methods are used to get/set the targeted range styles.

Here is the sample:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GC_Grouping_DnD-2069406637.zip

Kindly let me know if you are facing the issue still.

Regards,
Christo.



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

;