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.
Unfortunately, activation email could not send to your email. Please try again.

Drag''n''Drop: How can I understand target cell in virtual mode of GC?

Thread ID:

Created:

Updated:

Platform:

Replies:

34739 Sep 15,2005 04:59 AM Sep 17,2005 03:57 AM Windows Forms 5
loading
Tags: GridControl
Andrew
Asked On September 15, 2005 04:59 AM

Hello! I want to implement DnD to GridControl. Where can I get rowIndex and colIndex of target cell? Thanks.

Administrator [Syncfusion]
Replied On September 15, 2005 07:52 AM

Hi Andrew, GridControl has built-in drag and drop features. All you have to do is set AllowDrop to true to paste. When you wish to drag items from grid, select the cells and hover over borders of the selected region, you will notice a drag icon indicating ready to drag, just drag. By this you can drag and drop items. See if this helps. Refer the sample in program files\syncfusion\essential studio\3.2.1.0\Windows\Grid.Windows\samples\Quick Start\OleDragDrop Best regards, Stanley

Andrew
Replied On September 15, 2005 09:20 AM

Hi Stanley! Thank you. You''ve described the steps to drag cells from the grid. And the another question is - how can I DnD some object _into_ the cell of grid and especially how do I(and grid) know the row and the column of cell, this obect was dropped to?

Administrator [Syncfusion]
Replied On September 15, 2005 11:57 AM

Hi Andrew, You can just drop the dragged items into the grid, this is possible only if you set AllowDrop to true. To know where the changes are made use CellsChanged handler. Private Sub gridControl2_CellsChanged(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCellsChangedEventArgs) Console.WriteLine(e.Range.Top +" "+ e.Range.Left +" "+ e.Range.Bottom +" "+ e.Range.Right) End Sub Best regards, Stanley

Andrew
Replied On September 15, 2005 04:36 PM

>Hi Andrew, > >You can just drop the dragged items into the grid, this is possible only if you set AllowDrop to true. To know where the changes are made use CellsChanged handler. > > Private Sub gridControl2_CellsChanged(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCellsChangedEventArgs) > Console.WriteLine(e.Range.Top +" "+ e.Range.Left +" "+ e.Range.Bottom +" "+ e.Range.Right) > End Sub > > >Best regards, >Stanley Thanks! But where can I get object that was drop to grid (by the way, I am using virtual mode)? Do I synchronize 2 handlers (DnD and OnCellChange)?

Administrator [Syncfusion]
Replied On September 17, 2005 03:57 AM

Hi Andrew, Refer this sample and let me know if you need more information. Best regards, Stanley

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.

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.

;