how to creating columns dynamically with datatables Jquery

how to creating columns dynamically with datatables Jquery

marsmars Posts: 29Questions: 2Answers: 0
edited February 2013 in General
I am using server_processing to get data. The problem is that i dont want to specify the name of columns by html, i want to create that dynamically when getting data by ajax. in addition, the number of columns might be different when getting data by ajax. i used "aoColumns", but it seems not to work well when the number of columns is changed.

would you please help me about this? THX very much~

Replies

  • marsmars Posts: 29Questions: 2Answers: 0
    i have to use a bad way to solve this problem. i just specify a div for datatable in html and i initialize the datatable (even the DOM element) by JS. Then the datatables works well when i redefine the datatables. the duplicate header doesn't appear again.
This discussion has been closed.