Login Register

complex values grid model ItemFileReadStore

complex values in model sent to grid

hi all,
I want to do something like below with a grid but it seems I can't use complex values in a dojo.data.ItemFileReadStore:

var subrow = [
  name: 'MyCol', field: "myField", formatter: formatField }
];
function formatField(value) {
  return "<b>'+value[0]+"</b><br/>"+value[1];
}

and the data I return from the server is something like

{ 
  identifier: "myId",
  label: "myId",
  items: [
   { myId: "1", 
     myField: ["a","b"]
   }
  ]
}
Syndicate content