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.
精彩评论