Hi I'm populating an ondemand dgrid with data and it works if I'm using 3.x api library, but not the 4.x library. Is anyone aware of issues with dgrid in the 4.x library? my code, identical for both apis is below:
BusinessGetConfirm: function (data, msg) {
//set grid with business data fromdatabase
if (msg === "ok") {
var testdata = [
{ ID: 1, Contact: "bob", Company: "tester", Address: "123", City: "Yucaipa", Zip: "92372", NAICS6: "123", NAICS6DESC: "DESC", NAICS8: "123", NAICS8DESC: "DESC" },
{ ID: 1, Contact: "bob", Company: "test", Address: "123", City: "Yucaipa", Zip: "92372", NAICS6: "123", NAICS6DESC: "DESC", NAICS8: "123", NAICS8DESC: "DESC" }
]
//businessStore = new Memory({ data: data.BusinessGetResult, idProperty: "ID" });
var businessStore = new Memory({ data: testdata });
grid = new (declare([OnDemandGrid, DijitRegistry]))({
store: businessStore,
columns: {
ID: "ID",
Contact: "Contact",
Company: "Company",
Address: "Address",
City: "City",
Zip: "Zip",
NAICS6: "NAICS6",
NAICS6DESC: "NAICS6Desc",
NAICS8: "NAICS8",
NAICS8DESC: "NAICS8Desc"
}
}, "BusinessGridDiv");
grid.startup();
}
else {
alert(msg)
}
},
Version 3.0 result
Version 4.0 result
Thanks
Pete
Solved! Go to Solution.
Make sure to check out the versions used in 4.x, for example: Additional packages. It could be something simple like setting the 'collection' property instead of 'store', or it could be something more complicated depending on what dgrid/dstore functionality you'd like to use. Check out the migration guide here: dgrid/0.4 Migration
Make sure to check out the versions used in 4.x, for example: Additional packages. It could be something simple like setting the 'collection' property instead of 'store', or it could be something more complicated depending on what dgrid/dstore functionality you'd like to use. Check out the migration guide here: dgrid/0.4 Migration
Thanks John, this is very helpful -- I'll check it out
Pete
just a few minor changes