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
close icon

GGC: need custom group selection processing

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.

6 Replies

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


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


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


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


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


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

Loader.
Live Chat Icon For mobile
Up arrow icon