jQuery UI Widgets Forums ASP .NET MVC How to get the data from my nested grid by expanding a row of my jqxgrid using s

This topic contains 1 reply, has 1 voice, and was last updated by  Novato 3 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Novato

    Hi, I have a problem and I don’t know why it is I hope you can help me with this in advance, thank you very much.

    I have a main grid that when expanding a row shows me a nested grid, I currently get the data from the nested grid and it works correctly but there is a big problem.

    My question is:

    How can I get the data from the nested grid when I expand a row using showfilterrow?

    First I check my data and filter the pending data using showfilterrow, then expand a row to show the nested grid and finally I get the data from the nested grid but it makes me an error.

    This is my code:

    var array_detalle_subgrid = [];
     $('#gvDatos').on('rowexpand', function(event) {
                        var args = event.args;
                        var rowBoundIndex = args.rowindex;
                        window.setTimeout(function() {
                          // This line is where I get an error
                            var nestedGridID = nestedGrids[rowBoundIndex][0].id
                            var rows_subgrid = $('#' + nestedGridID).jqxGrid('getrows');
                            array_detalle_subgrid = rows_subgrid;
                            console.log('rows >>', rows_subgrid);
                            console.log('Resultado nuevo array >>', array_detalle_subgrid);
                        }, 0);

    This is the error:

    Uncaught TypeError: Cannot read property '0' of undefined

    Could you please provide me with an example to obtain the nested grid data using showfilterrow.

    Thank you.


    Thanks, I was able to solve the problem.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.