I have a two level hiearchary RadGrid and in the MastertableView there is a column which is a sum of a column in the DetailsTable. When I update a row in the DetailsTable how can I force the parent MasterTableView row to update as well to reflect the new sum?
Thanks
1 Answer, 1 is accepted
0
Veli
Telerik team
answered on 27 Aug 2008, 11:07 AM
Hello chase,
Here is what you need to add. In the UpdateCommand event handler, you can get a reference to the updated item's parent item and update a control in it. The following example assumes we have created a template column in the MasterTableView with a label control inside that can be updated when child items are edited:
(e.Item.OwnerTableView.ParentItem["TemplateColumn"].FindControl("Label1") as Label).Text = "Changed";
}
The above code checks if the currently updated item belongs to a detail table, and if true, gets the item's parent item and updates a control inside its template column.
Greetings,
Veli
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.