Hi Danilo,
Thanks for your update.
If you want to expand the record to show the child table details on clicking the record, you can use the TableControlCellClick event for this. In this event you can check the condition for expand only for the particular records. Please refer to the following code snippet,
Code Snippet:
this.hierarchyGrid.TableControlCellClick += new GridTableControlCellClickEventHandler(hierarchyGrid_TableControlCellClick);
private void hierarchyGrid_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
if (style.TableCellIdentity.DisplayElement.Kind == Syncfusion.Grouping.DisplayElementKind.Record)
{
Record CurrentRecord = style.TableCellIdentity.DisplayElement.GetRecord();
//Add the condition here for expanding only the particular record
if (CurrentRecord.HasNestedTables && CurrentRecord.GetValue("ParentName").ToString() == "parentName3")
{
//Expand the child record to show the child table
CurrentRecord.SetExpanded(true, true, true);
}
}
}
Sample:
Regards,
Adhi