Skip to content

Use the callback functionality to update the master grid when detail grid data changes.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/asp-net-web-forms-grid-refresh-master-grid-on-detail-grid-callback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid View for ASP.NET Web Forms - How to refresh a master grid on a detail grid callback

This example demonstrates how to use the callback functionality to update the master grid when detail grid data changes.

Overview

Handle the detail grid's client-side BeginCallback and EndCallback events to refresh the master grid control when a callback is finished. Use the command argument property to determine the action that initiates that callback.

<dx:ASPxGridView ID="ASPxGridView1" runat="server" KeyFieldName="Id" ... >
    <SettingsDetail ShowDetailRow="true" />
    <!-- ... -->
    <Templates>
        <DetailRow>
            <dx:ASPxGridView ID="gridProducts" runat="server" KeyFieldName="Id" ... >
                    <ClientSideEvents EndCallback="OnEndCallback" BeginCallback="OnBeginCallback" />
                <!-- ... -->
            </dx:ASPxGridView>
        </DetailRow>
    </Templates>
</dx:ASPxGridView>
var command = "";
function OnBeginCallback(s, e) {
    command = e.command;
}
function OnEndCallback(s, e) {
    if (command == "ADDNEWROW") {
        s.Refresh();
    }
}

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the callback functionality to update the master grid when detail grid data changes.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •