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.

Row selection with mouse

Thread ID:





41777 Mar 10,2006 01:49 PM Mar 13,2006 02:42 AM Windows Forms 1
Tags: GridControl
Asked On March 10, 2006 01:49 PM

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 02:42 AM

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.

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.