避免调整dojox.grid.datagrid标题宽度

时间:2013-04-03 08:46:05

标签: datagrid grid dojo dojox.grid.datagrid

  • 下面是我的声明性dojox.grid.datagrid。我想避免重新调整列的宽度。在UI中我可以进行列重新调整大小。如何避免它

    <div class="claro" id="customer" name="dataGrid" onclick="setWidgetproperty(this.id,'xy','inner__customer')" ondblclick="editCustomGrid(this.id)" onmouseup="setDocStyle(this.id)" style="height: 200px; left: 178px; position: absolute; top: 176px; width: 950px;">
     <table class="claro" dojotype="dojox.grid.DataGrid" id="inner__customer" rowselector="10px" style="height: 180px; width: 400px;">
          <thead>
               <tr>
                    <th field="Column1" width="100px">
                         Column1
                    </th>
                    <th field="Column2" width="100px">
                         Column2
                    </th>
                    <th field="Column3" width="100px">
                         Column3
                    </th>
                    <th field="Column4" width="100px">
                         Column4
                    </th>
                    <th field="Column5" width="100px">
                         Column5
                    </th>
               </tr>
          </thead>
     </table>
     <input id="hidden__customer" name="dataGrid" style="display:none;" type="hidden">
    

1 个答案:

答案 0 :(得分:1)

这个问题已经回答了,请看这篇文章:

Dojo DataGrid - preventing column resize

您必须从声明式切换到网格的编程创建,才能使用每列的noresize属性。