Hi,
I have a project where in a RadGrid the Master Table rows contain template columns that display totals based values in the Child detail table. The user is able to Update the Detail table rows which would affect the totals given in the parent row. However, when the user does update a record, the parent row doesn't update until I reload the page. How can I use the update event to also rebind the parent row?
I currently have a SQLDataSource object for each of the Parent and Child tables. Is there a relatively easy way to get the Parent Row to rebind on update since I shouldn't need to rebind all rows in the parent?
Currently, I have only written a RadGrid1_UpdateCommand and RadGrid1_ItemDataBound.
I have a project where in a RadGrid the Master Table rows contain template columns that display totals based values in the Child detail table. The user is able to Update the Detail table rows which would affect the totals given in the parent row. However, when the user does update a record, the parent row doesn't update until I reload the page. How can I use the update event to also rebind the parent row?
I currently have a SQLDataSource object for each of the Parent and Child tables. Is there a relatively easy way to get the Parent Row to rebind on update since I shouldn't need to rebind all rows in the parent?
Currently, I have only written a RadGrid1_UpdateCommand and RadGrid1_ItemDataBound.
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) |
{ |
//Get the GridEditableItem of the RadGrid |
GridEditableItem editedItem = e.Item as GridEditableItem; |
//Get the Primary Key associated with the edited row |
//Get the Control Values for the associated rows |
//Insert and update soem information in the database |
} |
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem && e.Item.OwnerTableView.DataSourceID == "SQLDataSourceParent") |
{ |
//Get the GridEditableItem of the RadGrid |
GridDataItem dataItem = e.Item as GridDataItem; |
//Get the primary key value of the row using the DataKeyValue. |
//Set the Template Column values based on database records |
} |
} |