JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/grid/resources/claroGrid.css">
<div id="gridDiv" class="claro"></div>
CSS
/*Grid need a explicit width/height by default*/
#grid {
width: 80em;
height: 40em;
}
JavaScript
dojo.require("dojox.grid.EnhancedGrid");
dojo.require("dojox.data.JsonRestStore");
dojo.ready(function(){
/*set up data store*/
var store = dojox.data.JsonRestStore({
target: "/rest/employees"
});
/*set up layout*/
var layout = [[
{name: 'Column 1', field: 'salary', width: '100px', editable : true},
{name: 'Column 2', field: 'postion', width: '100px', editable : true},
{name: 'Column 3', field: 'office', width: '200px'}
]];
/*create a new grid:*/
var grid = new dojox.grid.EnhancedGrid({
id: 'grid',
store: store,
structure: layout,
rowsPerPage: 5,
rowSelector: "20px",
selectionMode: "single",
},
document.createElement('div'));
/*append the new grid to the div*/
dojo.byId("gridDiv").appendChild(grid.domNode);
/*Call startup() to render the grid*/
grid.startup();
});