- 在聲明式dojox.grid.datagrid中,我在表標記中使用onresizecolumn。
onresizecolumn = 「columnResize(this.id,this.cellIdx)」在聲明式dojox.grid.datagrid的onresize列中獲取列索引
onresizecolumn調用一個函數。在調整特定的列我想獲得cellIdx。
<div class="claro" id="eterte" name="dataGrid" onclick="getConnect('inner__eterte');setWidgetproperty(this.id,'xy','inner__eterte');" ondblclick="editCustomGrid(this.id)" onmouseup="setDocStyle(this.id)" style="height:200px; left:39px; position:absolute; top:251px; width:950px;">
<table class="claro" dojotype="dojox.grid.DataGrid" id="inner__eterte" onresizecolumn="columnResize(this.id,this.cellIdx)" rowselector="10px" style="height: 180px; width: 400px;">
<thead>
<tr>
<th field="Column1" id="Column1_6" width="159px">
Column1
</th>
</tr>
</thead>
</table>
<input id="hidden__eterte" name="dataGrid" style="display:none;" type="hidden">
</div>
function columnResize(id,index){
alert();
alert(id);
alert(index);
}
有什麼錯誤?警報輸出的是什麼?什麼版本的Dojo?用於alert(id)= inner__eterte和alert(index)= undefined的 – 2013-04-10 09:20:27
。 dojo version = 1.7 – Rachel 2013-04-10 09:38:59