How to bind by jquery object that have dynamic column

How to bind by jquery object that have dynamic column

pramuk97pramuk97 Posts: 5Questions: 0Answers: 0
edited March 2014 in General
How to bind by jquery object that have dynamic column
My column is not fixed.
It may have 6 column some time more than 6 or less then 6 also.
and I don't want header for my table.

Replies

  • robertbrowerrobertbrower Posts: 158Questions: 1Answers: 0
    Your question isn't really clear. DataTables doesn't care how many columns exist in the HTML Table element.
  • pramuk97pramuk97 Posts: 5Questions: 0Answers: 0
    Initially I met this example http://datatables.net/examples/data_sources/js_array.html but there is fixed 4 column but I have array object that has not fixed no of column.
  • robertbrowerrobertbrower Posts: 158Questions: 1Answers: 0
    Have you tried this example, leaving out the aoColumns option?
  • pramuk97pramuk97 Posts: 5Questions: 0Answers: 0
    @robertbrower Yes I already tried but thats not working.
  • robertbrowerrobertbrower Posts: 158Questions: 1Answers: 0
    I think you're going to have to create the aoColumns array dynamically based on your aaData. Hiding the header is another matter. I'm not sure about that.
  • pramuk97pramuk97 Posts: 5Questions: 0Answers: 0
    Thanks for your help.

    I got my answer here: http://datatables.net/forums/discussion/11637/aocolumndefs-with-dynamic-column-data/p1
This discussion has been closed.