enable auto thead creation when using aoColumns

enable auto thead creation when using aoColumns

yee379yee379 Posts: 6Questions: 0Answers: 0
edited October 2012 in Feature requests
so i'm loading a table through ajax and am defining the columns i want shown from my list of objects.

however, as i'm using ruby-on-rails, i put my javascript code into one coffeescript file and the actual html in another. so what that means is that if i wanted to add/remove another column quickly to my table i have to edit two files, otherwise i get a javascript error.

my feature request is that i would like to simply define [code][/code] element in my html, and have have the dataTable() function actually create the [code][/code] and inner [code][/code] elements when the dataTable object is instantiated.

thoughts?

Replies

  • allanallan Posts: 57,244Questions: 1Answers: 9,113 Site admin
    DataTables should create the THEAD if it is needed, like in this example: http://datatables.net/release-datatables/examples/data_sources/js_array.html . Can you link me to a test case which isn't working so I can understand the issue further.

    Allan
  • yee379yee379 Posts: 6Questions: 0Answers: 0
    ah, yes - it does indeed; i just needed sTitle. the datatables plugin i was using appeared to also have disabled the automatic THEAD creation. thanks!
This discussion has been closed.