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.

GGC, multiselect rows with mouse only

Thread ID:





54630 Jan 12,2007 12:03 PM Jan 15,2007 09:12 AM Windows Forms 3
Tags: GridControl
John H
Asked On January 12, 2007 12:03 PM

Which event should I use to detect when the user has multi selected rows in a GGC without using the keyboard? E.g. the user clicks a row and drags down which selects 2 or more rows, and then releases the left mouse button.


Administrator [Syncfusion]
Replied On January 15, 2007 06:15 AM

Are you using the record selection support specific to GridGroupingControl? (ie,

this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended;


If so, you can use the SelectedRecordsChanging and SelectedRecordsChanged events.

John H
Replied On January 15, 2007 08:06 AM

Thanks Clay,
Another question for you though, why does SelectedRecordsChanged event get called multiple times? Even selecting a single row calls the event 5 times, 4 times with e.Table.SelectedRecords containing 0 records, and once with an add for the selected record.
When selecting multiple rows an add event is triggered for each row, I just want to know the rows that are selected and act upon it. How do I do this?


Administrator [Syncfusion]
Replied On January 15, 2007 09:12 AM

The RecordChanged event is called when the collection is modified. To see what is going on, you check the e.Action member of the event args. Normally, when you click on a row and start to drag, you see the event hit twice, once with e.Action = Reset and once with e.Action = Add. Then as you select more rows with your drag, you see more events with e.Action = Add.

I do not know of a simple way just to get all the selections at once. To do this this, I think you will have to replace the default selection mouse controller with your own. This will take some coding.


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.