I'm struggling to make the Dojo Grid widget function properly.
The grid itself is included declaratively:
<table data-dojo-type="dojox.grid.DataGrid" data-dojo-attach-point="relationshipsGrid"></table>
Next, I am attempting to connect the grid to a Memory data store:
var relationships = [
{ id: 1, market: "SE", entity: "An object" },
{ id: 2, market: "SE", entity: "Another object" },
{ id: 3, market: "SE", entity: "Yet another object" }
];
var store = new Memory({ data: relationships });
var layout = [[
{ 'name': 'ID', 'field': 'id', 'width': '10px' },
{ 'name': 'Market', 'field': 'market', 'width': '30px' },
{ 'name': 'Entity', 'field': 'entity', 'width': '100px' }
]];
this.relationshipsGrid.structure = layout;
this.relationshipsGrid.store = store;
this.relationshipsGrid.startup();
However, all I see is an empty grid with zero height. When I set a specific height, it only displays as an empty gray area. The markup is generated by Dojo, but it doesn't show any items from my store.
I believe there might be a simple solution to this issue, but any assistance would be greatly valued! :)