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.
Syncfusion Feedback

Different behavior with Shift-leftClick and Ctrl-leftClick

Thread ID:

Created:

Updated:

Platform:

Replies:

33104 Aug 12,2005 02:38 PM UTC Apr 3,2007 12:22 PM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 12, 2005 02:38 PM UTC

Set ListBoxSelectionMode = SelectionMode.MultiExtended Set ControllerOptions = GridControllerOptions.OleDataSource In runtime, select 2 consecutive rows (e.g. 1st and 2nd) with Shift+left mouse button. In this case you can drag (mouse cursor transforms into the "drag-cursor") the selection either at the top of the first row or at the bottom of the second one. However, if you select these 2 rows with the Ctrl key, and e.g. the current cell is in the 3rd row, you cannot drag the selection at the top of the first row, only at the top and bottom of the second one. And why QueryCanOleDragRange receives a RangeInfo and not a RangeInfoList object? Check out explorer, it is able to manage Ctrl+LClick selection drags.

Administrator [Syncfusion]
Replied On August 12, 2005 04:12 PM UTC

I think both items you bring up are related. When you do shift to select, you get one GridRangeInfo that was expanded to reflect the shift-select action. And this GridRangeInfo object is added to the Selections collection. If you do a ctl to select an adjcent row, the existing selected GridRangeInfo is not extended to include the adjacent row. Instead another GridRangeInfo object is added to the Selections collection. Our default OLE D&D only supports dragging a single range, the grid.Selections.Ranges.ActiveRange. So, this is why you see the behavior you reported. (And this is the same functionality you will find in Excel, since you cannot even do multiple selections in Excel). You can add your own D&D support to handle multiple ranges, but you might have to make some accomodation for dragging into applications like Excel that do not handle multiple ranges.

Administrator [Syncfusion]
Replied On August 15, 2005 12:27 PM UTC

Just a hint: if ListBoxSelectionMode = SelectionMode.MultiExtended then it''s a list rather than an Excel-like grid. So I think, dragdrop of multiple selections should work...

Matyas Csaba
Replied On April 3, 2007 12:22 PM UTC

Üdvözlöm Váradi Gergely

Levelét olvasva azt láttam Ön is hasonló gondokkal küzd0tt mint én Drag and Drop ügyben.

Haladt-e azóta e témában?
Ha igen tudna számomra öttletet adni hogy lehet több nem összefüggö sort D&D -olni

Tisztelettel
Mátyás Csaba
Csaba.Matyas@saia-burgess.hu

>Set ListBoxSelectionMode = SelectionMode.MultiExtended
>
>Set ControllerOptions = GridControllerOptions.OleDataSource
>
>In runtime, select 2 consecutive rows (e.g. 1st and 2nd) with Shift+left mouse button. In this case you can drag (mouse cursor transforms into the "drag-cursor") the selection either at the top of the first row or at the bottom of the second one.
>
>However, if you select these 2 rows with the Ctrl key, and e.g. the current cell is in the 3rd row, you cannot drag the selection at the top of the first row, only at the top and bottom of the second one.
>
>And why QueryCanOleDragRange receives a RangeInfo and not a RangeInfoList object? Check out explorer, it is able to manage Ctrl+LClick selection drags.

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

;