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.
Up arrow icon