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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC: need custom group selection processing

Thread ID:

Created:

Updated:

Platform:

Replies:

53580 Dec 15,2006 07:24 PM UTC Dec 19,2006 12:58 PM UTC WinForms 6
loading
Tags: GridControl
Konstantin
Asked On December 15, 2006 07:24 PM UTC

I am using GGC. In my application loaded grid records are initially grouped by one column (fixed one). I need user to have ability selecting only whole groups, not single records.

The problem is that I don't know how to process range selection with collapsed groups - i need to add underlying records to grids selected records collection. And I don't know which events I can use in order to detect which groups are being selected: CellMouseDown (neither CellMouseUp ) doesn't occur when clicking on a collapsed group header.

Thank you for your help.

Administrator [Syncfusion]
Replied On December 15, 2006 07:28 PM UTC

PS: Btw, Click event is not what I need as I need user to be able to make range selections (with mouse drag&drop multiselection) or with a keyboard (SHIFT + arrows)

Administrator [Syncfusion]
Replied On December 18, 2006 09:03 AM UTC

Hi Konstantin,

You can handle the TableControlMouseDown event and add related records in a group to selected record collection. Here is a code snippet to show this.

private void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
{
Point pt = new Point(e.Inner.X,e.Inner.Y);
GridTableCellStyleInfo style = e.TableControl.PointToTableCellStyle(pt);
Element el = style.TableCellIdentity.DisplayElement;

Group mGroup = el.ParentGroup;
//Check the CaptionRow.
if( mGroup.Name == "Col1" && el.Kind == DisplayElementKind.Caption )
{
foreach(Record rec in mGroup.Records)
e.TableControl.Table.SelectedRecords.Add( rec );
}
}

Please refer to the attached sample for more details.
GGCGroupSelection.zip

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On December 19, 2006 12:57 PM UTC

Hello, Haneef!

Thank you for reply, was already desperate to get it.

Sadly, your snippet doesn't help me to make SLIDE selection (e.g. mouse down on one header, up on another).

Administrator [Syncfusion]
Replied On December 19, 2006 12:58 PM UTC

Hello, Haneef!

Thank you for reply, was already desperate to get it.

Sadly, your snippet doesn't help me to make SLIDE selection (e.g. mouse down on one header, up on another).

Administrator [Syncfusion]
Replied On December 19, 2006 12:58 PM UTC

Hello, Haneef!

Thank you for reply, was already desperate to get it.

Sadly, your snippet doesn't help me to make SLIDE selection (e.g. mouse down on one header, up on another).

Administrator [Syncfusion]
Replied On December 19, 2006 12:58 PM UTC

Hello, Haneef!

Thank you for reply, was already desperate to get it.

Sadly, your snippet doesn't help me to make SLIDE selection (e.g. mouse down on one header, up on another).

CONFIRMATION

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.

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

;