This question is locked. New answers and comments are not allowed.
Hi Guys,
I am working with a GridView that is using the Grouping the ChildTable features.
Each Group contains a child table of information as well as parent rows within the group itself.
When rows in the Child Table are updated ideally I should be throwing a property change event that causes an update to the parent row. But my attempts tin acheiving this just couldn't get the parent row to see what was happening). Consequently i went tactical and am doing the update of the parent row data via the CellEditEnded function in the child table. This all works great.
My last challenge is i need the currrent Group Totals FOR THE PARENT ROWS to be refreshed. The only way i have managed to do this is calling 'Rebind' which i think is a horrible solution! Is there a better way? I am using the standard SUM aggregate functions of the Telerik Grid.
//needed cause the total don't reflect the update otherwise!
dgRiskEntryList.Rebind();
I am working with a GridView that is using the Grouping the ChildTable features.
Each Group contains a child table of information as well as parent rows within the group itself.
When rows in the Child Table are updated ideally I should be throwing a property change event that causes an update to the parent row. But my attempts tin acheiving this just couldn't get the parent row to see what was happening). Consequently i went tactical and am doing the update of the parent row data via the CellEditEnded function in the child table. This all works great.
My last challenge is i need the currrent Group Totals FOR THE PARENT ROWS to be refreshed. The only way i have managed to do this is calling 'Rebind' which i think is a horrible solution! Is there a better way? I am using the standard SUM aggregate functions of the Telerik Grid.
private void dgChildItemList_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
List<ItemEntity> List = ((RadGridView)sender).Items.Cast<ItemEntity>().ToList();
switch (e.Cell.DataColumn.DataMemberBinding.Path.Path.ToString())
{
case "myColumn":
//this changes parent row data without the need for a rebind; using PropertyChanged event
((
SummaryEntity)e.Cell.ParentRow.GridViewDataControl.ParentRow.DataContext).myColumn = GetTotal();
break;
}//needed cause the total don't reflect the update otherwise!
dgRiskEntryList.Rebind();
}
Any help much appreciated!