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

Grouping Grid Related Table Selected Records

Thread ID:





52081 Nov 21,2006 04:01 PM UTC Nov 22,2006 05:08 AM UTC WinForms 1
Tags: GridControl
Josh Collins
Asked On November 21, 2006 04:01 PM UTC

I have a scenario where the grouping grid is bound to a collection which a child collection.

A GridRelationDescriptor is added using the public property of the child collection to create the hierarchy.

The grid builds out correctly, however when I attempt to query the selected records of the grid I can only retrieve the selected rows of the top-level.

The grid is set to have the MultiExtended selection mode as well as the GridSelectionFlags set to None as per some other examples posted.

Below are a list of properties interrogated and the value returned:

grid.Table.SelectedRecords.Count = 1 (Top level selected record, this is correct).

grid.Table.RelatedTables.Count = 1 (There is only 1 sub collection, this is correct).

grid.Table.RelatedTables[0].SelectedRecords.Count = 0 (This is incorrect, several are selected)

grid.Table.RelatedTables[0].Records.Count = 0 (This is definitely incorrect, there are items in the collection which are displayed as rows)

I have seen other samples provided using data sets, however using object entities the same methodologies are not working.


Administrator [Syncfusion]
Replied On November 22, 2006 05:08 AM UTC

Hi Josh,

In a flat groupinggrid, you can get the selected records in this manner.

GridTable gt = this.gridGroupingControl1.Table;
foreach(SelectedRecord rec in gt.SelectedRecords)

With the nested tables, you need to get the child table you want, and do the same type of thing. Here is a code snippet

GridTable gt = this.gridGroupingControl1.GetTable("ChildTable");
foreach(SelectedRecord rec in gt.SelectedRecords)

Please refer to the attached sample for getting selected record in a grid.

Best Regards,


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