I am using single XML file to update both MasterTable and DetailTable views.
When I edit a row in detailTable, then XML is updated and so is values of few columns in mastertableview.
The update in detailTable view take place via edit template and by default after UpdateCommand completion, which updates required XML. The control goes to NeedDatasource and DetailTableDataBind. sample code below
protected
void RadGridFinancials_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = ds.Tables[
"NEWXML"];
// OR should I use
//RadGrid1.MasterTableView.DataSource = ds.Tables["NEWXML"]; But this also does not update mastertableview
// HierarchyLoadMode = "ServerOnDemand"
}
protected void RadGridFinancials_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
{
e.DetailTableView.DataSource = ds.Tables["NEWXML"];
}
But after these calls only detailtableview gets updated and not mastertableview.
So How can I update mastertableview columns after update in row of detailtableview ?
This is required because few columns in mastertable view is valued as sum of a particular column in detailtableview. So an update in row of childtable needs to update parent tableview row.