Below is my declarative dojox.grid.datagrid. I want to avoid re-sizing the column's width. In the UI am able to do column re-sizing. how to avoid it
<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">
Add a comment
|
1 Answer
This question has been answered already, check out this post:
Dojo DataGrid - preventing column resize
You will have to switch from declarative to a programatic creation of the grid for being able to make use of the noresize attribute for each column.
-
i don't know, that is why i suggest switching to programatic mode ! Try adding data-dojo-props="noresize: true" to your th elements before switching, maybe it works... Commented Apr 3, 2013 at 9:44
-
ok better i will switch to programmatic mode. after giving noresize: true, can i able to re-size column's width using dojo slider?– RachelCommented Apr 3, 2013 at 9:57
-
i think that the noresize attribute only disables the UI elements which allow the resize-stuff, a programatic resize would still be possible, but you would have to redraw the grid. Commented Apr 3, 2013 at 10:08