DHTMLX Docs & Samples Explorer

setColWidth(ind, value)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxgrid.js

sets width of specified column in pixels (doesn't work with percentage)

  • ind - column index
  • value - new width value
   //set first column width
   mygrid.setColWidth(0,"150");

See also: setColTypes, setColSorting, setColAlign, setColVAlign, setColumnMinWidth