How to access child record(s) from a gridcaptionsection or gridcaptionsummarycell

How can I access the child record(s) from a GridCaptionSection or GridCaptionSummaryCell in a ggc that has one level of grouping?


3 Replies

AD Administrator Syncfusion Team December 11, 2006 04:47 AM UTC

Hi James,

You can access the related records from GroupCaptionSummaryCell using the following code.

// get the CaptionRow from the DisplayElement.
GridCaptionRow gr = CaptionSummarystyle.TableCellIdentity.DisplayElement as GridCaptionRow;

//Accessing the related records in a Group...
foreach(Record rec in gr.ParentGroup.Records)
{
Console.WriteLine("Records:" + rec);
}

Best Regards,
Haneef


JB James Blibo December 11, 2006 05:23 PM UTC

This did NOT solve my problem. The cell that I am interested in is the GridCaptionSection and GridCaptionSummaryCell AND NOT a GridCaptionRow like in your example


AD Administrator Syncfusion Team December 12, 2006 05:06 AM UTC

Hi James,

Here is a minimal sample that shows you How to access child record(s) from the CaptionSection or CaptionSummaryCell in a grid. It implements the TablecontrolCellClick event to get the child record from the CaptionSummaryCell. Please refer to the attached sample for more details.

GGCCaptionSectionRecords.zip

Best Regards,
Haneef

Loader.
Up arrow icon