storeDatahandler with 2 grid

  1. #1

    storeDatahandler with 2 grid

    I need to send 2 Grid from JavaScript to my controller.
    When it is 1 Grid use the following code:


    var fxjPagar = function(elemento){
    var v_data1 = App.gpLista_Detalle.getStore().getChangedData();

    var dataUrl;
    dataUrl = elemento.dataUrlPagar;

    Ext.net.DirectMethod.request({
    url: dataUrl,
    eventMask: { showMask: true, msg: 'Cargando....' },
    params: {data : v_data1}
    });
    };


    In my controller I have the following code:

    public ActionResult Pagar(StoreDataHandler stoPagar)
    {
    List<dataPago_DTO> lst_Pagos = new List<dataPago_DTO>();
    dataPago_DTO ent_Pagos = new dataPago_DTO();

    ChangeRecords<dataPago_DTO> data = stoPagar.BatchObjectData<dataPago_DTO>();
    lst_Pagos = data.Created.ToList();

    return this.Direct();
    }


    With this code works correctly for 1 Grid.

    But I need to send 2 Grid and I do it this way:

    var fxjPagar = function(elemento){
    var v_data1 = App.gpLista_Detalle.getStore().getChangedData();
    var v_data2 = App.gpPago_Detalle.getStore().getChangedData();

    var dataUrl;
    dataUrl = elemento.dataUrlPagar;

    Ext.net.DirectMethod.request({
    url: dataUrl,
    eventMask: { showMask: true, msg: 'Cargando....' },
    params: {data : [v_data1,v_data_2]}
    });
    };

    What code should I have in my controller to receive the two grid?

    Thanks for your help.

    Miguel.
  2. #2
    Hello Miguel!

    Please use [code][/code] tags to wrap code blocks you paste in posts, it becomes much better to read them.

    Besides, please provide runnable test case so we can run the code you came up with and advise you how to make the aspect you want to work!

    Here's a few helpful threads you may want to review:

    - Tips for creating simplified code samples
    - Forum Guidelines For Posting New Topics
    - More information required

    Would you mind editing your post above to wrap code tags in your code text?
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Command ChangeRecord and StoreDataHandler
    By vlrolim in forum 2.x Help
    Replies: 1
    Last Post: Aug 19, 2014, 6:38 PM
  2. [CLOSED] StoreDataHandler Refresh
    By ehmdb in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 14, 2013, 1:45 AM
  3. StoreDataHandler.BuildConfirmationList()
    By sant3 in forum 2.x Help
    Replies: 0
    Last Post: Jul 02, 2012, 6:23 PM
  4. [CLOSED] error with json StoreDataHandler
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 25, 2009, 3:35 PM
  5. Replies: 10
    Last Post: Oct 09, 2008, 9:36 AM

Tags for this Thread

Posting Permissions