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. Image for the cookie policy date

Row selection with mouse

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.

1 Reply

AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon