我在使用dojox.grid.EnhancedGrid
时将行结构设为{ "editable: true, alwaysEditing: true" }
时出现问题。我们在输入值中更改后,dojox.grid.cells.textbox
和dojox.grid.cells.selectbox
不会自动保存到存储区。大多数情况下,onStartEdit
,onApplyCellEdit
函数也不会在此处触发。
这有什么问题?
的Javascript
var grid = new dojox.grid.EnhancedGrid({
store: store,
autoWidth: true,
onApplyCellEdit: function() { alert('saved editing'); },
structure: [
{ name: "Item Number", field: "col1", width: "84px", editable: true, alwaysEditing: true },
{ name: "Item Description", field: "col2", width: "84px" },
{ name: "Stock/Non Stock", field: "col3", width: "84px" }
]
}, "grid");
如果我们从结构中删除"alwaysEditing: true"
,那么每件事都会正常工作。商店将自动保存,并会触发onStartEdit
,onApplyCellEdit
个功能。
如果我们使用普通数据网格(dojox.grid.DataGrid
)而不是dojox.grid.EnhancedGrid
。对于结构{ "editable: true, alwaysEditing: true" }
的行,一切都会正常工作。
请给我解决方案,让alwaysEditing: true
让商店得到更新并触发以下函数onStartEdit
,onApplyCellEdit
也可以使用dojox.grid.EnhancedGrid。
请找到demo,其中EnhancedGrid不会触发onApplyCellEdit
功能,并自动将行结构保存为alwaysEditing
至true
。该演示有时会触发onApplyCellEdit
,但大多数情况下它不会触发onApplyCellEdit
。
请找到demo,其中EnhancedGrid触发alwaysEditing
功能,并在从行结构中删除alwaysEditing
时保存存储。请双击第一列以获得可编辑模式的字段。
请给我一个解决方案,其中EnhancedGrid支持onApplyCellEdit
保存存储和触发{{1}}功能。
我可以知道这是dojo EnhancedGrid的错误吗?