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.

right click in selected rows GridDataControl

Thread ID:

Created:

Updated:

Platform:

Replies:

104292 Jul 9,2012 01:21 AM Jul 10,2012 03:11 AM WPF 1
loading
Tags: GridControl
Rich Fabros
Asked On July 9, 2012 01:21 AM

Hi,

I'm using Syncfusion v 9.404.0.62.

With the GridDataControl multiple row selection, right clicking inside the selected rows deselects everything else except the row I clicked on?

How do I keep the selections selected when it is right clicked on?

Thanks,
Rich 

Rajasekar [Syncfusion]
Replied On July 10, 2012 03:11 AM

Hi Rich,

 

Thank you for your update.

 

You can achieve your requirement by using the below code snippet,

 

Code Snippet[C#]

 

       this.dataGrid.Model.SelectionChanging += new GridSelectionChangingEventHandler(Model_SelectionChanging);
        
        void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
        {
            if (e.Reason == GridSelectionReason.MouseDown && Mouse.RightButton == MouseButtonState.Pressed
                && this.dataGrid.Model.SelectedRanges.AnyRangeContains(e.ClickRange))
            {
                e.Cancel = true;
            }
        }

 

Please let us know if you have any queries.

 

Thanks,

Rajasekar


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.

;