Hide/Show row detail with static data

Hide/Show row detail with static data

rthillrthill Posts: 1Questions: 0Answers: 0
edited January 2012 in General
Hi,

I need some help setting up my row detail example. I have a working version from http://datatables.net/examples/api/row_details.html, but would like to modify that a) on every load the table shows always the details and b) have the detail data somewhere in my html.
I don't want to put an XHR in place to fetch row details, but would simply reuse existing page, e.g. use cell 4-7 as detail or use every second row as detail.

Any hints?

Thanks.

Replies

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    a. Just call fnOpen on each of the rows. $( table.fnGetNodes() ).each( function () { table.fnOpen(this, 'info' ); } );

    b. Read the information from wherever you have it in the DOM and pass it in as the second argument to fnOpen.

    Allan
This discussion has been closed.