title: Setting Column width in jQuery Datatables using aoColumnDefs
body: <p>I use Datatables to display dynamic data from my database via ajax. Because the user can filter the data, not all the possible columns are always displayed. I wanted to set the width of certain columns so decided to use <code>aTargets</code> within the header data, and then used <code>aoColumnDefs</code> to pick out certain columns and change the width. For some reason this doesn't work. </p>
  
  <p>You can see my code below, I am getting the json data via ajax and re-creating the datatable each time using <code>"bDestroy": true,</code></p>
  
  <p><strong>Table Headers JSON:</strong></p>
  
  <pre><code>[{"sTitle":"Category","aTargets":[0]},{"sTitle":"Tag Title","aTargets":[1]},{"sTitle":"Question","aTargets":[2]},{"sTitle":"Date\/Time","aTargets":[3]},{"sTitle":"Score","aTargets":[4]},{"sTitle":"Comment","aTargets":[5]},{"sTitle":"First Node","aTargets":[6]},{"sTitle":"Second Node","aTargets":[7]},{"sTitle":"Thrid Node","aTargets":[8]},{"sTitle":"Forth Node","aTargets":[9]},{"sTitle":"Fifth Node","aTargets":[10]},{"sTitle":"Sixth Node","aTargets":["data_analysis_category"]}]
  </code></pre>
  
  <p>As you can see the <code>Sixth Node</code> header at the end has an <code>aTargets</code> of "data_analysis_category"</p>
  
  <p><strong>Javascript:</strong></p>
  
  <pre><code>    var res = $('#export_table').dataTable({
  
          "bDestroy": true,
          "bJQueryUI": true,
          "bFilter": true,
          "sScrollX": "100%",
          "bScrollCollapse": true,
          "iDisplayLength": 10,
          "sPaginationType": "full_numbers",
          "sDom": '&lt;""f&gt;t&lt;"F"lp&gt;',
          "aoColumns": pp['headers'],
          "aaData": pp['data'],
          "aoColumnDefs": [
                        { "sWidth": "200px", "aTargets": ["data_analysis_category"]}
                    ],
      })
  </code></pre>
  
  <p>As you can see I am trying to target "data_analysis_category" within the <code>aoColumnDefs</code> and set the width, but it does absolutely nothing.</p>
  
  <p>I have been trying to get this working for quite some time without luck, any help is appreciated.</p>