Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Best pratice to update Parent View after closing modal #12053


User avatar
0
Bernard created

Hi,

**I wanted to know the method of updating a parent's fields after closing a modal is correct or if there is a simpler way: ** var selectedEntityId = $('#MasterDetailChild_Convention_LigneConventionsId').val();

_modalManager.setBusy(true); _ligneConventionsService .createOrEdit(ligneConvention) .done(function () {

     abp.notify.info(app.localize('SavedSuccessfully'));

         abp.ajax({
             type: 'GET',
             url: '/api/services/app/Conventions/GetConventionForView',
             data: {
                 id: selectedEntityId
             }
         }).done(function (data) {
           
             update_TotalHT(data.convention.totalHT.toFixed(2));
             update_TotalTVA(data.convention.totalTVA.toFixed(2));
             update_TotalTTC(data.convention.totalTTC.toFixed(2));
         });
   


     _modalManager.close();
     abp.event.trigger('app.createOrEditLigneConventionModalSaved');


 }), 

2 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hello @Bernard,

    Your approach seems correct. You can proceed this way.

  • User Avatar
    0
    Bernard created

    Thks