I am working with a RadGrid that has expandable rows, each of which contains a RadGrid within a NestedViewTemplate. These child RadGrids have visible footers and a few columns, one of which is "DtlTransAmount":
<NestedViewTemplate>
<asp:Panel ID="pnDetailItems" runat="server" >
<telerik:RadGrid ID="rgDetailItems" runat="server" ShowFooter="true" Width="1675px" AutoGenerateColumns="false" AllowPaging="false"
OnItemDataBound="rgDetailItems_ItemDataBound" ... >
<MasterTableView>
<Columns>
<telerik:GridBoundColumn HeaderText="Amount" DataField="DtlTransAmount" UniqueName="DtlTransAmount" SortExpression="DtlTransAmount"
HeaderStyle-Width="20px" ItemStyle-Width="20px" FilterControlWidth="20px" DataFormatString="{0:$0.00}"/>
The footer text for each child RadGrid is set in the ItemDataBound event in the code behind:
private void rgDetailItemsItemDataBound(object sender, GridItemEventArgs e)
{
var foot = e.Item as GridFooterItem;
var r = sender as RadGrid;
foot["DtlTransAmount"].Text = "Total Amount: $" + GetMainSumFromDetailRadGrid(r);
//...
This results in each child RadGrid displaying something like the following in the footer of the "DtlTransAmount" column:
Total Amount: $10.00
Now, I need to update this sum value (the "10.00") via JavaScript when a textbox cell in a child RadGrid loses focus due to a user changing amount values. I can successfully call a function with a single input parameter (the calling object), but I'm unsure of what to do next:
function detailAmountUpdate(obj) {
// alert("Made it here at least...");
// no idea what to do now.
}
For instance, if there are three expanded rows and I unfocus from a textbox in the child RadGrid of the second row, how can I update the labels in the footer of just that specific child RadGrid? DOM functions like getElementsByTagName and Telerik API functions like get_nestedViews are returning empty, undefined, or null values.