views:

42

answers:

1

Hi,

I'm using jQuery DataTables in my .NET webapplication but how do I set a max width for one specific column, all the other columns should be auto sized (like they are now in my table)

EDIT

The DataTable did it correctly by itself, the problem was there was a very long word without spaces that cause the problem

+2  A: 

Your problem seems more CSS related ...

Using word-wrap in CSS would fix that issue, for columnX just add this to your CSS.

.columnX {
  word-wrap: break-word;
}

It would wrap even words without spaces based on your set width for the column.

See: https://developer.mozilla.org/en/css/word-wrap

Justin Jenkins