开发者

Add a row to a Dojo 1.5 DataGrid

开发者 https://www.devze.com 2023-02-27 03:08 出处:网络
How do yo开发者_C百科u add a row to a Dojo DataGrid, Dojo version 1.5? There apparently is no newItem() function in 1.5 which is the only answer I\'ve found in my searches.check kind of data store tha

How do yo开发者_C百科u add a row to a Dojo DataGrid, Dojo version 1.5? There apparently is no newItem() function in 1.5 which is the only answer I've found in my searches.


check kind of data store that you use. If you use dojo.data.ItemFileReadStore you can't add new items because it's read-only data store. Instead of dojo.data.ItemFileReadStore you should use dojo.data.ItemFileWriteStore. This data store will allow you to add (store.newItem({}/*new item object*/)), modify (store.setValue(item, "name", newValue)) and delete(store.deleteItem(items)) items.

0

精彩评论

暂无评论...
验证码 换一张
取 消