How can I update dojox.Grid so that it displays the latest data?
Initially I store empty, and then I changed the data to be included in something, created a new data store with the new data store and then set the grid datastore to the new store.
In most instances, people use a URL instead
// use empty grid, var is empty data = {identifier: "UID_T", label: "UID_T", item: []}; Var lgaNameSelectionStore = new dojo.data.ItemFileReadStore ({Data: blankData}); Var lgaNameGridLayout = [{Name: "& lt; span title = 'agency' & gt; Agency & lt; / span & gt;", field: "AGENCY", width: "7em"}, {name: "& lt ; Span title = 'Project Description' & gt; Project Details & lt; / span & gt; ", Field:" Projects ", Width:" 20em "}, {Name:" & lt; span title = 'description' Gt; Details & lt; / span & gt; Field: "CTPPD_DESC", Width: "12em",},];; Var lgaNameContainer = new dijit.layout.BorderContainer ({Style: "width: 100%; height: 100%", gutter: wrong, design: "title"}, "LGOnide"); LgaNameGrid = new dojox.grid.DataGrid ({store: lgaNameSelectStore, area: "center", structure: lgaNameGridLayout, selection mode: "none", no data message: "No results found."}); LgaNameContainer.addChild (lgaNameGrid); LgaNameContainer.startup (); // data has changed, so the grid var data 3 = {identifier: "UID_T", label: "UID_T", item: [{"UID_T": "I333", "AGENCY": "RTA", "Updates to CTPPD_DESC Need to ":" M5 "," Projects ":" filtration "," location ":" "}}}}; LgaNameSelectionStore = new dojo.data.ItemFileReadStore ({Data: Data3}); LgaNameGrid.setStore (lgaNameSelectionStore);
The problem is here:
lgaNameSelectionStore = new Dojo.data.ItemFileReadStore ({Data: Data3});
You can not add new data to ItemFileReadStore (read only), then you must use an ItemFileWriteStore
Comments
Post a Comment