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

GridGroupingControl - Multi-Rows select and Right click problem.

Thread ID:





37202 Nov 17,2005 11:35 AM UTC Nov 17,2005 12:47 PM UTC WinForms 1
Tags: GridControl
Badri Rajani Kanth
Asked On November 17, 2005 11:35 AM UTC

Hi All, 1. I have a GGC. When select multiple rows using keyboard/mouse and right click, I am only left with the last selected rows. All other rows are de-selected. I want to have all the selected rows as I want to do combined operation. 2. Also, without holding the shift key, if I just hold the left mouse button and move the mouse on the grid, it selects multiple rows. How to avoid this? Rgds Rajani Kanth

Administrator [Syncfusion]
Replied On November 17, 2005 12:47 PM UTC

1) Setting these properties: gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None; gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended; //or MultiSimple gridGroupingControl1.TableModel.Options.SelectCellsMouseButtonsMask = MouseButtons.Left; should prevent the right click from affecting the selections. 2) Not selecting records as you drag the leftmousedown is not one of the standard SelectionModes found in a ListBox. So, you will have to handle an event to try to implement this behavior. Here is a try at this with the canceling the SelectedRecordChanging event when you do not want the record selected. It may need to be further tweaked to get the exact behavior you want, but this is the event you will likely used to get it.
private SelectedRecord firstSelectedRecord = null;
private void gridGroupingControl1_SelectedRecordsChanging(object sender, SelectedRecordsChangedEventArgs e)
	if( e.Action == SelectedRecordsChangedType.Added 
		&&  0 == (Control.ModifierKeys & Keys.Shift))
		if(firstSelectedRecord != null && firstSelectedRecord != e.SelectedRecord)
			e.Cancel = true;
	firstSelectedRecord = e.SelectedRecord;


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