Link to home
Start Free TrialLog in
Avatar of HyperBPP
HyperBPP

asked on

Jquery Datatables 1.9 with sAjaxSource columns not auto width to column contents.

I also posted this as a discussion on the datatables website.

Using the following code:
 
$(document).ready(function(){
 oTable = $('###URL.name#').dataTable({
 "bProcessing": true,
 "bServerSide": true,
 "bStateSave": false,
 "bAutoWidth:":true,
 "sAjaxSource":"#application.settings.absoluteURL#Framework/Generics/DB/CFM/dataTableAJAXForm.cfm?name=#url.name#"


 });
 
WHen I apply this the columns all come with even width. If i do not use sAjaxSource and simply put all the table contents on the page the column widths vary with the width of the data. Is there a way to do this with sAjaxSource without explicitly defining each column swidth? The table is used in a generic "template" page that will have a wide variety of columns. I dynamically print the column headers and footers to the page with a function (using ColdFusion 9 btw).
 
Thanks! Datatables is rad btw.
ASKER CERTIFIED SOLUTION
Avatar of Coast Line
Coast Line
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial