title: Set dojox.grid.datagrid header column width dynamically
body: <ul>
  <li>I have a declarative dojox.grid.datagrid with initial header column width. And i have a textbox. my need is</li>
  <li><p>In UI, if user enters any value to textbox, that value should be set as the dynamic width of column's header.</p>
  
  <pre><code>&lt;div class="claro" id="dfgdfgd" name="dataGrid" onclick="setWidgetproperty(this.id,'xy','inner__dfgdfgd');" ondblclick="editCustomGrid(this.id)" onmouseup="setDocStyle(this.id)" style="height:200px; left:42px; position:absolute; top:89px; width:950px;"&gt;
   &lt;table class="claro" dojotype="dojox.grid.DataGrid" id="inner__dfgdfgd" rowselector="10px" style="height: 180px; width: 300px;"&gt;
        &lt;thead&gt;
             &lt;tr&gt;
                  &lt;th field="Column1" id="Column1" noresize="true" width="100px"&gt;
                       &lt;label id="Column1" onclick="getCustomGridColName(this.id,'inner__dfgdfgd');" style="cursor:pointer; font-family: Times; font-size:12pt;"&gt;
                            Column1
                       &lt;/label&gt;
                  &lt;/th&gt;
                  &lt;th field="Column2" id="Column2" noresize="true" width="100px"&gt;
                       &lt;label id="Column2" onclick="getCustomGridColName(this.id,'inner__dfgdfgd');" style="cursor:pointer; font-family: Times; font-size:12pt;"&gt;
                            Column2
                       &lt;/label&gt;
                  &lt;/th&gt;
             &lt;/tr&gt;
        &lt;/thead&gt;
   &lt;/table&gt;
   &lt;input id="hidden__dfgdfgd" name="dataGrid" style="display:none;" type="hidden"&gt;
  </code></pre>
  
  <p></p></li>
  </ul>
  
  <p>I am able to get the particular column's width using below code. How to set back this width to textbox value.</p>
  
  <pre><code>dojo.forEach(dijit.byId(tableID).layout.cells, function(cell,idx){
                  if(cell.field == id){
                      headerWidth = cell.width;
                      alert(headerWidth);
                  }
              });
  </code></pre>