Using Dojo 1.0.2 (and I can't upgrade at the moment)
I have this markup:
That's backed by this:
myStore = new dojo.data.ItemFileWriteStore({data:{
label : "firstName", identifier : "id", items : [ ]
}});
myModel = new dojox.grid.data.DojoData(null, myStore);
myLayout = [{
cells: [[
{ name : "First Name", field : "firstName", width : "auto" },
{ name : "Description", field : "description", width : "auto" }
]]
}];
I'm adding a row like so:
myStore.newItem({
id : new Date().getTime(),
firstName : "test",
description : "hello"
});
myModel = new dojox.grid.data.DojoData(null, myStore);
dijit.byId("myGrid").setModel(myModel);
Now, to this point, everything works as expected. Here's where the trouble comes in. I'm editing an item like so (the variable item is the item from the store):
item.firstName = "aaa";
item.description = "bbb";
myModel = new dojox.grid.data.DojoData(null, myStore);
dijit.byId("myGrid").setModel(myModel);
Now... I've confirmed that the data in the store is getting updated: if I pull the item out later I can see the updates present. And the grid does update at this point.
HOWEVER...
Both columns only show the first letter of the new values, so column 1 has "a" and column 2 has "b" in it from this example.
I'm beating my head against the wall on this and I have a tight deadline to meet. Can anyone offer any suggestions at all? Thanks very much!
