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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl SelectedItems before MouseUp

Thread ID:





104834 Aug 22,2012 08:19 PM UTC Aug 27,2012 01:17 PM UTC WPF 1
Tags: GridControl
Rich Fabros
Asked On August 22, 2012 08:19 PM UTC


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.


Santhosh A [Syncfusion]
Replied On August 27, 2012 01:17 PM UTC

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.


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.





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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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