How do I autosize the column in SlickGrid?

前端 未结 7 1314
情歌与酒
情歌与酒 2020-12-08 00:25

I want slickgrid to autosize the columns based on the widest content or header text - whichever is wider. In simpler terms, I want it to simulate the default behavior of reg

7条回答
  •  情深已故
    2020-12-08 00:56

    When constructing your options, you can use forceFitColumns: true

    var options = {
        enableCellNavigation: true,
        forceFitColumns: true
    };
    

    This will make the columns fill the entire width of your grid div.

提交回复
热议问题