dgrid
scroll width
HTML
<script src="http://amd.egoworx.com/jsfiddle-dojo-require.js"></script>
<h1>Demo: dgrid horizontal scrolling</h1>
<div id="grid"></div>
CSS
.dgrid-grid {
width: 99%; /*jsfiddle issue, you should be able to use 100%*/
height: 10em !important; /*for auto height see the dgrid css docs. Needs important bc this css is loaded after dgrid*/
}
.dgrid-cell {
width: 400px;
}
JavaScript
require(["dgrid/Grid", "dojo/domReady!"],
function (Grid) {
var data = [{
first: "Bob",
last: "Barker",
age: 89
}, {
first: "Vanna",
last: "White",
age: 55
}, {
first: "Pat",
last: "Sajak",
age: 65
}, {
first: "Pat",
last: "Sajak",
age: 65
}, {
first: "Pat",
last: "Sajak",
age: 65
}, {
first: "Pat",
last: "Sajak",
age: 65
}];
var grid = new Grid({
columns: {
first: "First Name",
last: "Last Name",
age: "Age"
}
}, "grid");
grid.renderArray(data);
});