Posted 31 March 2020, 9:42 am EST
Hi Dave,
For this, you should handle the CreatingRow event of the C1DataGrid. This event fires for each row when it is being created. Its eventargs expose the Type of the row being created which we can use to check if the row is group row/not. If the row is group row then handle its GroupRowsVisiblityChanged event.
Following is the code snippet for the same:```
private void Grid_CreatingRow(object sender, DataGridCreatingRowEventArgs e)
{
if(e.Type== DataGridRowType.Group)
{
var grpRow = e.Row as DataGridGroupRow;
if(grpRow != null)
{
grpRow.GroupRowsVisibilityChanged += GrpRow_GroupRowsVisibilityChanged;
}
}
}
private void GrpRow_GroupRowsVisibilityChanged(object sender, PropertyChangedEventArgs e)
{
//clicking the +/- icons will trigger this event
}
With regards,
Ruchir