This example uses the command setColumnWidth(colNum, width) to dynamically change the width sizes of columns.
Syntax: myGrid.setColumnWidth(colNum, widthInPixel);
In the example, this command is called in the function setcolwidth(aObj1, aObj2) when the button "Set Column" is clicked. The function setcolwidth is called with the dropdown and field object reference passed as first and second parameter. The current value of each object will then be used to call the command setColumnWidth for myGrid.
function setcolwidth(aObj1, aObj2){