关闭后无法在对话框中重新显示dojo网格
我在dojo对话框中创建dojox.grid.EnhancedGrid。 它工作正常,当我第一次点击按钮时,所有显示都正常。 但当我单击“取消”隐藏对话框,然后再次单击按钮触发该函数并显示对话框时。显示完全错误,网格标题不完整,没有显示数据。所有网格都是灰色的 请帮助我在对话框中重新显示dojo网格关闭后无法在对话框中重新显示dojo网格,dojo,dialog,grid,Dojo,Dialog,Grid,我在dojo对话框中创建dojox.grid.EnhancedGrid。 它工作正常,当我第一次点击按钮时,所有显示都正常。 但当我单击“取消”隐藏对话框,然后再次单击按钮触发该函数并显示对话框时。显示完全错误,网格标题不完整,没有显示数据。所有网格都是灰色的 请帮助我在对话框中重新显示dojo网格 <table dojoType="dojox.grid.EnhancedGrid" id="grid6" plugins="{indirectSelection: true, selectab
<table dojoType="dojox.grid.EnhancedGrid" id="grid6" plugins="{indirectSelection: true, selectable: true, dnd: true, nestedSorting: true, loadingMessage: 'Loading...', errorMessage: 'An error exists within the data.' }" selectionMode="extended" class="popupDojoTable" style="height:200px;" rowSelector="0px">
<colgroup span="3" noscroll="true"></colgroup>
<colgroup span="6"></colgroup>
<thead>
<tr>
<th field="machType" width="60px">Machine<br />type</th>
<th field="machSerNum" width="100px">Machine<br />serial<br />number</th>
<th field="mesNum" width="80px" styles="text-align:right;">MES<br />number</th>
<th field="bookType" width="60px">Book<br />type</th>
<th field="machMod" width="80px">Machine<br />model</th>
<th field="transType" width="80px">Transaction<br />type</th>
<th field="effDte" width="80px">Effective<br />date</th>
<th field="custNum" width="80px">Customer<br />number</th>
<th field="assetPeriodNum" width="60px" styles="text-align:right;">Asset<br />period<br />number</th>
</tr>
</thead>
<tbody>
...
</tbody>
</table>
取消按钮的功能非常简单:
<button dojoType="dijit.form.Button" type="button" onclick="dijit.byId('grid6').setStore(null);dijit.byId('dialogRecordsOnHold').hide();">Cancel</button>
取消
我已经自己修好了。
将代码更改为:
load: function(data) {
// hide dialogProcessing
dijit.byId('dialogOpeningView').hide();
dijit.byId('dialogRecordsOnHold').show();
var gridData = new dojo.data.ItemFileWriteStore({data:{items:data}});
dijit.byId('grid6').setStore(gridData);
},
)};
我已经自己修好了。将代码更改为:load:function(data){var gridData=new dojo.data.ItemFileWriteStore({data:{items:data}});//hide dialogProcessing dijit.byId('dialogOpeningView').hide();dijit.byId('dialogRecordsOnHold').show();dijit.byId('grid6').setStore(gridData);},)};
load: function(data) {
// hide dialogProcessing
dijit.byId('dialogOpeningView').hide();
dijit.byId('dialogRecordsOnHold').show();
var gridData = new dojo.data.ItemFileWriteStore({data:{items:data}});
dijit.byId('grid6').setStore(gridData);
},
)};