Dynamically set column widths in datatables

Dynamically set column widths in datatables

Chintu535Chintu535 Posts: 2Questions: 1Answers: 0

I have been using datatables to represent data in tabular format. On some click events of buttons i am hiding/showing some columns.And also am resizing the columns.When i try to save the selected columns , i am saving column names along with the widths in the database.
when i login again those selected columns with the columnwidths saved in database should be displayed. But when am trying to apply the values of column widths from database values, column widths are not getting applied and the table is getting divided with default datatables inline style. I have not given any inlune style. When i see using developer options in the browser the width is getting divided automatically without my values. I want to apply my column widths for the columns i get from database.

I am applying the column width as
$('.customer').css ('width :','100px');

Applying style for column with class customer.
i am really stuck with this.Please help me out.

Thankyou

This discussion has been closed.