use aaData from diferent datatable

use aaData from diferent datatable

josephejosephe Posts: 11Questions: 0Answers: 0
edited September 2011 in General
hallo

does anybody know how to set datasource to datatable initialization from other datatable where I get data from server processing like object version of aaData ?
my goal is to call serverside processing just once and then use callback data in more datatables.

j.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    http://www.datatables.net/release-datatables/examples/data_sources/js_array.html

    I think the best approach is to use bDestroy to remove old table and rebuild using the array you got from your server processing script

    [code]
    $('#example').dataTable( {
    "aaData": your_aaData_variable,
    "bDestroy": true
    });

    [/code]
  • josephejosephe Posts: 11Questions: 0Answers: 0
    thanks fbas for response...
    how exactly I can reference existing aaData object array from other datatables?
    I mean what should be after "aaData": ?..... probably just reference to object but not sure how...:)
This discussion has been closed.