Cannot list details data in jQuery Datatable

前端 未结 1 798
闹比i
闹比i 2020-12-11 13:58

I followed jQuery Datatable - Sliding child rows example (just look at \"Complete code\" section on that page) in my ASP.NET MVC project and I could listed master & stat

1条回答
  •  伪装坚强ぢ
    2020-12-11 14:30

    You need to show loading indicator in the child row, retrieve content via Ajax and inject it into the child row replacing loading indicator.

    For example:

    // ... skipped ...
    
    // Open this row
    row.child('

    Loading...

    ', 'no-padding' ).show(); tr.addClass('shown'); $('div.slider', row.child()).slideDown(); $.getJSON("GetStudents?id=" + id, function(data){ $('td', row.child()).html(format(data)); $('div.slider', row.child()).show(); }); // ... skipped ...

    See this example for code and demonstration.

    0 讨论(0)
提交回复
热议问题