I cannot apply multi settings

I cannot apply multi settings

jonycastjonycast Posts: 2Questions: 0Answers: 0
edited May 2011 in General
Hello, i was trying to make my table with differents settings but it does not works
for example i have this:
[code]

$(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
oTable =$('#example').dataTable( {
"aaSorting": [[ 4, "desc" ]],
"aoColumns": [
null,
null,
null,
null,
null
]
} );
} );

[/code]

and the following message appears
"DataTables warning (table id = 'example'): Cannot reinitialise DataTable.

To retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster)."

Obviously I am not making it correctly, but i have no idea about how to do it

i hope you might understand me, beacuse I from Argentina.. please help me!!

Thanks!!

Replies

  • jonycastjonycast Posts: 2Questions: 0Answers: 0
    well i have already resolved my problem!!!
    thanks anyway!!
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    For anyone else interested, you combine the two together:

    [code]


    $(document).ready(function() {
    oTable = $('#example').dataTable({
    "bJQueryUI": true,
    "sPaginationType": "full_numbers",
    "aaSorting": [[ 4, "desc" ]],
    "aoColumns": [
    null,
    null,
    null,
    null,
    null
    ]
    } );
    } );

    [/code]
    Allan
  • undertakeundertake Posts: 1Questions: 0Answers: 0
    edited May 2011
    Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster)."
  • feelysfeelys Posts: 1Questions: 0Answers: 0
    edited May 2011
    I feel that the code to be very careful, not a little mistake, so it is easy to mistake, in fact, I like to do this line of code, even though I was careless! Thank you!
This discussion has been closed.