<div data-dojo-type="dojo/store/JsonRest" data-dojo-id="myData" data-dojo-props='target: "/rest/user?id="'></div> <div data-dojo-type="dojo/data/ObjectStore" data-dojo-id="myStore" data-dojo-props="objectStore: myData"></div> <table data-dojo-type="dojox/grid/EnhancedGrid" data-dojo-id="myGrid" data-dojo-props='store: myStore,autoWidth:true,autoHeight:true,rowSelector: "20px",plugins:{ indirectSelection: {headerSelector:true,width:"40px",styles:"text-align: center;"},pagination: true },loadingMessage : "请稍候..."> <thead> <tr> <th field="name" width= "200px" >用户名</th> <th field="desc" width= "200px" >描述</th> </tr> </thead> </table>
function updateRow( ) { var index = myGrid.selection.selectedindex; var item = myGrid.getItem(index); var store = myGrid.store; store.setValue(item,'name','新名字'); store.setValue(item,'desc','新描述'); }改变grid列值实际上是改变store的值,是对store的操作
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。