This question is locked. New answers and comments are not allowed.
Is there a way to refresh the parent grid that contains details after a detail save? In this situation the details are added up into a total on the parent line of the parent grid. I need to refresh the line that is expanded OR refresh the whole parent grid and then re-expand it to the same row after a detail view is saved. We are using the detailview grid in cell edit mode. Take a look:
<div id="divGrid" style="overflow: hidden; height: auto">
@(Html.Telerik().Grid<SAM.Framework.Utilities.CloneClasses.vxClaimBO>(Model.vxClaimBOs)
.Name("ClaimsGrid")
.Columns(columns =>
{
columns.Bound(e => e.InvoiceDate).Format("{0:MM/dd/yyyy}").Title("Invoice Date").Width(90);
columns.Bound(e => e.InvoiceNo).Width(75).Title("Invoice No");
columns.Bound(e => e.PostedDate).Format("{0:MM/dd/yyyy}").Title("Posted Date").Width(90);
columns.Bound(e => e.PatientNo).Width(50).Title("Patient");
columns.Bound(e => e.AdmissionNo).Width(50).Title("Admit");
columns.Bound(e => e.PatientDisplayName).Width(120).Title("Patient Name");
columns.Bound(e => e.PayorName).Width(120).Title("Payor Name");
columns.Bound(e => e.UnitCode).Width(45).Title("Unit");
columns.Bound(e => e.ClaimAmount).Format("{0:c}").Width(75).Title("Claimed");
columns.Bound(e => e.PaidAmount).Format("{0:c}").Width(75).Title("Paid");
columns.Bound(column => column.ClaimID).Title("")
.Template(@<text><a href='/Billing/AdjustmentOrTransfer/Index/@item.ClaimID?yz=@item.AgencyObfuscated' > Tran/Adj</a></text>)
.ClientTemplate("<a href='/Billing/AdjustmentOrTransfer/Index/<#= ClaimID #>?yz=<#= AgencyObfuscated #>'> Tran/Adj</a>")
.Width(75).Filterable(false).HtmlAttributes(new { style = "text-align:center" });
columns.Bound(e => e.AmountDue).Format("{0:c}").Width(90).Title("Amount Due");
columns.Bound(e => e.ARStatusType).Width(70).Title("Status");
columns.Bound(e => e.StartOfCareDate).Format("{0:MM/dd/yyyy}").Width(100).Title("Start of Care Date");
columns.Bound(e => e.StartDate).Format("{0:MM/dd/yyyy}").Width(100).Title("Start Date");
columns.Bound(e => e.EndDate).Format("{0:MM/dd/yyyy}").Width(100).Title("End Date");
})
.ClientEvents(events => events.OnDataBound("onClaimsGridDataBound"))
.DetailView(details => details.ClientTemplate(
Html.Telerik().Grid<SAM.Framework.Utilities.CloneClasses.vxClaimDetailBO>(Model.vxClaimDetailBOs)
.Name("Claims_<#= ClaimID #>")
.DataKeys(keys => { keys.Add(o => o.BillDetailID); })
.ToolBar(commands =>
{
commands.SubmitChanges();
})
.Columns(columns =>
{
columns.Bound(o => o.BillDetailNo).Width(65);
columns.Bound(e => e.PostedDate).Format("{0:MM/dd/yyyy}").Width(85);
columns.Bound(o => o.ChargeNo).Width(60);
columns.Bound(o => o.ChargeCodeDescription).Width(90);
columns.Bound(o => o.ChargeCodeGrossAmount).Format("{0:c}").Width(80);
columns.Bound(o => o.BillDetailAmount).Format("{0:c}").Width(80);
columns.Bound(e => e.PaidAmount).Format("{0:c}").Width(80);
columns.Bound(o => o.PaymentAmount).Format("{0:c}").Width(70); ;
columns.Bound(o => o.BillDetailAmountDue).Format("{0:c}").Width(80);
columns.Bound(o => o.StaffNo).Width(60);
columns.Bound(o => o.StaffDisplayName).Width(150);
columns.Bound(o => o.ChargeCodeGrossAmount).Format("{0:c}").Width(90);
})
.ClientEvents(events => events.OnDataBinding("Grid_onDataBinding").OnError("Grid_onError"))
.DataBinding(dataBinding => dataBinding.Ajax()
.Select("GridClaimDetailsSelect", "Payments", new { @agency = Model.AgencyProfile.Agency, @selectedClaimID = "<#= ClaimID #>" })
.Update("GridClaimDetailsUpdate", "Payments", new { @agency = Model.AgencyProfile.Agency, @selectedClaimID = "<#= ClaimID #>" })
)
.Editable(editing => editing.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Filterable()
.ToHtmlString()
))
.DataBinding(dataBinding => dataBinding.Ajax().Select("GridClaimsSelect", "Payments", new { @agency = Model.AgencyProfile.Agency, @patientSearchText = Model.PatientSearchText, @startDate = Model.FromDate, @endDate = Model.ToDate, @selectedARStatusTypeID = Model.SelectedARStatusTypeID, @ShowResultOnFirstLoad = Model.ShowResultOnFirstLoad }))
.Sortable(sorting => sorting.Enabled(true))
.Pageable(paging => paging.Enabled(true).PageSize(15))
.Filterable(filtering => filtering.Enabled(true))
.Scrollable(scrolling => scrolling.Height(400))
.Groupable(grouping => grouping.Enabled(false))
.Resizable(resizing => resizing.Columns(true))
.HtmlAttributes(new { style = "width:99.8%;" })
)
</div>
<div id="divGrid" style="overflow: hidden; height: auto">
@(Html.Telerik().Grid<SAM.Framework.Utilities.CloneClasses.vxClaimBO>(Model.vxClaimBOs)
.Name("ClaimsGrid")
.Columns(columns =>
{
columns.Bound(e => e.InvoiceDate).Format("{0:MM/dd/yyyy}").Title("Invoice Date").Width(90);
columns.Bound(e => e.InvoiceNo).Width(75).Title("Invoice No");
columns.Bound(e => e.PostedDate).Format("{0:MM/dd/yyyy}").Title("Posted Date").Width(90);
columns.Bound(e => e.PatientNo).Width(50).Title("Patient");
columns.Bound(e => e.AdmissionNo).Width(50).Title("Admit");
columns.Bound(e => e.PatientDisplayName).Width(120).Title("Patient Name");
columns.Bound(e => e.PayorName).Width(120).Title("Payor Name");
columns.Bound(e => e.UnitCode).Width(45).Title("Unit");
columns.Bound(e => e.ClaimAmount).Format("{0:c}").Width(75).Title("Claimed");
columns.Bound(e => e.PaidAmount).Format("{0:c}").Width(75).Title("Paid");
columns.Bound(column => column.ClaimID).Title("")
.Template(@<text><a href='/Billing/AdjustmentOrTransfer/Index/@item.ClaimID?yz=@item.AgencyObfuscated' > Tran/Adj</a></text>)
.ClientTemplate("<a href='/Billing/AdjustmentOrTransfer/Index/<#= ClaimID #>?yz=<#= AgencyObfuscated #>'> Tran/Adj</a>")
.Width(75).Filterable(false).HtmlAttributes(new { style = "text-align:center" });
columns.Bound(e => e.AmountDue).Format("{0:c}").Width(90).Title("Amount Due");
columns.Bound(e => e.ARStatusType).Width(70).Title("Status");
columns.Bound(e => e.StartOfCareDate).Format("{0:MM/dd/yyyy}").Width(100).Title("Start of Care Date");
columns.Bound(e => e.StartDate).Format("{0:MM/dd/yyyy}").Width(100).Title("Start Date");
columns.Bound(e => e.EndDate).Format("{0:MM/dd/yyyy}").Width(100).Title("End Date");
})
.ClientEvents(events => events.OnDataBound("onClaimsGridDataBound"))
.DetailView(details => details.ClientTemplate(
Html.Telerik().Grid<SAM.Framework.Utilities.CloneClasses.vxClaimDetailBO>(Model.vxClaimDetailBOs)
.Name("Claims_<#= ClaimID #>")
.DataKeys(keys => { keys.Add(o => o.BillDetailID); })
.ToolBar(commands =>
{
commands.SubmitChanges();
})
.Columns(columns =>
{
columns.Bound(o => o.BillDetailNo).Width(65);
columns.Bound(e => e.PostedDate).Format("{0:MM/dd/yyyy}").Width(85);
columns.Bound(o => o.ChargeNo).Width(60);
columns.Bound(o => o.ChargeCodeDescription).Width(90);
columns.Bound(o => o.ChargeCodeGrossAmount).Format("{0:c}").Width(80);
columns.Bound(o => o.BillDetailAmount).Format("{0:c}").Width(80);
columns.Bound(e => e.PaidAmount).Format("{0:c}").Width(80);
columns.Bound(o => o.PaymentAmount).Format("{0:c}").Width(70); ;
columns.Bound(o => o.BillDetailAmountDue).Format("{0:c}").Width(80);
columns.Bound(o => o.StaffNo).Width(60);
columns.Bound(o => o.StaffDisplayName).Width(150);
columns.Bound(o => o.ChargeCodeGrossAmount).Format("{0:c}").Width(90);
})
.ClientEvents(events => events.OnDataBinding("Grid_onDataBinding").OnError("Grid_onError"))
.DataBinding(dataBinding => dataBinding.Ajax()
.Select("GridClaimDetailsSelect", "Payments", new { @agency = Model.AgencyProfile.Agency, @selectedClaimID = "<#= ClaimID #>" })
.Update("GridClaimDetailsUpdate", "Payments", new { @agency = Model.AgencyProfile.Agency, @selectedClaimID = "<#= ClaimID #>" })
)
.Editable(editing => editing.Mode(GridEditMode.InCell))
.Pageable()
.Sortable()
.Filterable()
.ToHtmlString()
))
.DataBinding(dataBinding => dataBinding.Ajax().Select("GridClaimsSelect", "Payments", new { @agency = Model.AgencyProfile.Agency, @patientSearchText = Model.PatientSearchText, @startDate = Model.FromDate, @endDate = Model.ToDate, @selectedARStatusTypeID = Model.SelectedARStatusTypeID, @ShowResultOnFirstLoad = Model.ShowResultOnFirstLoad }))
.Sortable(sorting => sorting.Enabled(true))
.Pageable(paging => paging.Enabled(true).PageSize(15))
.Filterable(filtering => filtering.Enabled(true))
.Scrollable(scrolling => scrolling.Height(400))
.Groupable(grouping => grouping.Enabled(false))
.Resizable(resizing => resizing.Columns(true))
.HtmlAttributes(new { style = "width:99.8%;" })
)
</div>