1

I want my slickgrid to have different width for each column (because of my long as well as short data)...but cant get anything to work..

Using forcefitcolumns: true creates same width for each column.

Even minWidth and maxWidth provide different width to the column in header and other rows.

Thanks..

Premshankar Tiwari
  • 3,006
  • 3
  • 24
  • 30

3 Answers3

1

I found the solution...use maxWidth and minWidth and also apply forcefitcolumns : true... In that case columns will occupy remaining space with different widths

Premshankar Tiwari
  • 3,006
  • 3
  • 24
  • 30
0

You could take a look at an answer I posted on a previous question asked, which seems very similar to your problem... see here slickgrid-final-column-auto-size-to-use-all-remaining-space
Hope that helps you

Community
  • 1
  • 1
ghiscoding
  • 12,308
  • 6
  • 69
  • 112
0

You can give width in columns Array as follows:

var columns = [
    { 
       id: "Id", 
       name: "ColumnName", 
       field: "fieldName", 
       width: 100, 
       cssClass: "cell-title", 
       validator: decimalFieldValidator 
    }
];
Erik Schierboom
  • 16,301
  • 10
  • 64
  • 81
Jatin patil
  • 4,252
  • 1
  • 18
  • 27