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

Parent Row

1) May i know how to detect whether the parent row of the gridgroupingcontrol is being selected?? 2)How do u retrieve data from the parent row?

4 Replies

AD Administrator Syncfusion Team October 7, 2004 05:00 AM UTC

Hi Peggun, when a new record is selected a CurrentRecordContextChange event is raised. You can check this event to know which record is active. But since you are mentionioning "parent row"... If you are inside a nested table and a record is selected inside the nested table you can get a reference to the parent record with Record parentRecordOfNestedElement = element.ParentChildTable.ParentNestedTable.ParentRecord; Stefan


AD Administrator Syncfusion Team October 7, 2004 05:53 AM UTC

Does the parent row have any event for itself ? can I handle events by just selecting the parent row, instead of selecting the child row ?


AD Administrator Syncfusion Team October 7, 2004 07:48 AM UTC

basically i have a gridgroup control with one of the column set as group. how do i capture the data of the parent row in the gridgroup without expanding the group? reason for obtaining this data is to enable me to delete the whole group by accessing this parent row.


AD Administrator Syncfusion Team October 7, 2004 09:50 AM UTC

Is the DataSource a flat DataTable, or is it DataTable that has a Relation defined making it an hierarchical datasource? Here is code that is hit when you click on a CaptionRow in a grouped gridGroupingControl with a flat datasource.
private void gridGroupingControl2_CurrentRecordContextChange(object sender, Syncfusion.Grouping.CurrentRecordContextChangeEventArgs e)
{
	if(e.Action == CurrentRecordAction.EnterRecordComplete
		&& e.Record != null
		&& e.Record is GridCaptionRow)
	{
		GridCaptionRow rec = e.Record as GridCaptionRow;
		Console.WriteLine(rec.ToString());
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon