[Dojo-interest] dojox.grid.DataGrid + dojox.data.JsonRestStore

Kyle Spraggs theman at spiffyjr.me
Thu Sep 24 17:24:04 EDT 2009

I have a JsonRestStore with a DataGrid that I am unable to get working 
entirely. The DataGrid loads, the JSON service is queried, a response is 
returned, but the DataGrid is empty (no error, just empty).

function initGrid() {
     var store = new dojox.data.JsonRestStore({
         target: '<?=$this->url(array('controller' => 'events', 'module' 
=> 'api', 'format' => 'json'));?>'

     var layout = [
             field: 'id',
             width: '50%'
             field: 'title',
             width: '50%'

     var grid = new dojox.grid.DataGrid({
         store: store,
         structure: layout
     }, document.createElement('div'));


<div id="grid" style="height: 300px;"></div>

Details from server:
PvP"},{"id":"2","title":"Gather Reageants"}],"numRows":2,"identifier":"id"}

Any help would be appreciated.

Kyle Spraggs (SpiffyJr)

More information about the Dojo-interest mailing list