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

Row selection with mouse

Thread ID:





41777 Mar 10,2006 06:49 PM UTC Mar 13,2006 07:42 AM UTC WinForms 1
Tags: GridControl
Asked On March 10, 2006 06:49 PM UTC

I have these two options set in my GGC: this.TableOptions.AllowSelection = GridSelectionFlags.None; this.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended; When I highlight a row and drag the mouse, other rows highlight too. How do I prevent this so that highlighting multiple rows can only be done with Ctrl and Shift? Thanks.

Administrator [Syncfusion]
Replied On March 13, 2006 07:42 AM UTC

Hi Stephen, Selecting multiple rows by mouse drag can be prevented by handling the gridGroupingControl1.TableControl.MouseDown, the gridGroupingControl1.TableControl.MouseUp, and the gridGroupingControl1.SelectedRecordsChanging events. Below is a code snippet. bool MouseFlag = false; private void gridGroupingControl1_SelectedRecordsChanging(object sender, Syncfusion.Grouping.SelectedRecordsChangedEventArgs e) { if(this.MouseFlag) e.Cancel = true; } private void TableControl_MouseDown(object sender, MouseEventArgs e) { this.MouseFlag = true; } private void TableControl_MouseUp(object sender, MouseEventArgs e) { this.MouseFlag = false; } Regards, Calvin.


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