【发布时间】:2011-06-19 22:49:11
【问题描述】:
看在上帝的份上,这里有人可以发布一个使用 dojox.data.JsonRestStore 的工作 dojox.grid.DataGrid 示例,其中包含 2 列,日期和时间?
我尝试了以下方法:
<th field="startdate" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.DateTextBox" editable="true" formatter="formatDate"></code></pre> and
<th field="starttime" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.TimeTextBox" editable="true" formatter="formatDate">
还有:
<th field="startdate" cellType="dojox.grid.cells.DateTextBox" editable="true" formatter="formatDate"></code></pre> and
<th field="starttime" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.TimeTextBox" editable="true" formatter="formatDate">
但似乎没有任何效果。现在已经两天了,我一直在阅读大量的文档和报告,但我在任何地方都找不到有效的示例。
编辑:
我现在面临着程序员职业生涯中最奇怪的问题:网格现在可以与 DateTextBox 和 TimeTextBox 一起正常工作(这种情况适用于 Firefox 3.6.6 和 3.6.14pre、Internet Explorer 8 和 Google Chrome。),除了对于以下内容:
在 Firefox 3.6.13 中,网格中有偶数个项目,当我尝试编辑一个元素的时间或日期时,小部件框出现在左上角,日期未正确选择,浏览器CPU 达到 100% 时崩溃。
但是,如果项目数是奇数,则日期和时间的编辑工作正常。我完全不知道该怎么做,所以请提出一些想法。
【问题讨论】: