| Name | Address | Age | Superhero? |
|---|
Out Dojo Grid is declared using the following markup:
<table id="grid" dojoType="dojox.grid.DataGrid">
<thead>
<tr>
<th field="name" width="120px" editable="true">Name</th>
<th field="address" width="200px" editable="true">Address</th>
<th field="age" width="30px" editable="true">Age</th>
<th field="superhero" width="30px" editable="true">Superhero?</th>
</tr>
</thead>
</table>
All that's needed to initialize this is the following:
var dwrStore, grid;
dojo.addOnLoad(function() {
dwrStore = new dwr.data.Store("largeCrowd", { subscribe:true });
grid = dijit.byId("grid");
grid.setStore(dwrStore);
dwr.engine.setActiveReverseAjax(true);
});
There was once upon a time a hermit who lived in a forest at the foot
of a mountain, and passed his time in prayer and good works,
and every evening he carried, to the glory of God, two pails of water
up the mountain.