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.

GridDataControl SelectedItems before MouseUp

Thread ID:

Created:

Updated:

Platform:

Replies:

104834 Aug 22,2012 04:19 PM Aug 27,2012 09:17 AM WPF 1
loading
Tags: GridControl
Rich Fabros
Asked On August 22, 2012 04:19 PM

Hi,

I'm using the GridDataControl in version 9.4.

Is there any way to get the selectedItems before MouseUp (ideally on mouseDown or previewMouseDown) on the selected row? I am able to workaround the row that was clicked on through PointToCellRowColumnIndex, but how do i get the items that have been selected in a Shift or Ctrl selection?

The GridDataControl.SelectedItems is still empty at that time.

Thanks,
Rich

Santhosh A [Syncfusion]
Replied On August 27, 2012 09:17 AM

Hi Rich,

Thanks for using Syncfusion products.

We have analyzed your query and we are selecting the items in Mousedown Event, So we  can’t get the selected items before MouseUp Event, but you can get whether the key Pressed is Control or Shift by Handling the PreviewKeyDown Event. Please refer the below Code Snippet.

CodeSnippet[C#]:

this.dataGrid.PreviewKeyDown += new KeyEventHandler(dataGrid_PreviewKeyDown);

void dataGrid_PreviewKeyDown(object sender, KeyEventArgs e)

        {

            isControlKey = (e.KeyboardDevice.Modifiers & ModifierKeys.Control) != ModifierKeys.None;

            isShiftKey = (e.KeyboardDevice.Modifiers & ModifierKeys.Shift) != ModifierKeys.None;

        }

Please let us know if you have any queries.

 

Regards,

Santhosh.A


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.

;