Load detail table automatically - jQuery DataTable

Load detail table automatically - jQuery DataTable

josivanljosivanl Posts: 11Questions: 3Answers: 1

I have a jQuery Datatable that has a detail table, where it is displayed when expanded, the same as the example , but I need my detail table to display its detail table, but it can not be a click, it is displayed automatically.

I wonder if it is possible to make a call to the second detail table when loading the first detail table?

Every help is welcome

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    This example shows how you can load child rows with a click to activate. If you don't want the click to show, then simply execute the row().child() method without requiring a click event.

    Allan

  • josivanljosivanl Posts: 11Questions: 3Answers: 1

    I do not know how to make the event call automatically, could I send an example?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    It will call automatically for you every table the row is displayed in the DataTable.

    Allan

  • josivanljosivanl Posts: 11Questions: 3Answers: 1

    allan, what I need is that my detail is always visible and my main table does not have the icon to expand or collapse, the detail always appears without option to be collected.

    You know how I can do this?

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947
    Answer ✓

    One option is to use the createdRow callback. Here is an example:
    http://live.datatables.net/farilave/1/edit

    Kevin

  • josivanljosivanl Posts: 11Questions: 3Answers: 1

    kthorngren, thank you very much, that's exactly what I was looking for!

This discussion has been closed.