+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> \r
-<html> \r
-<head> \r
-<title>dojox.Grid with Dojo.Data via binding</title> \r
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> \r
- <style type="text/css"> \r
- @import "../../../dojo/resources/dojo.css"; \r
- @import "../_grid/Grid.css"; \r
- #grid { \r
- width: 65em; \r
- height: 25em; \r
- }\r
- </style> \r
- <script type="text/javascript" src="../../../dojo/dojo.js" \r
- djConfig="isDebug: true, debugAtAllCosts: false, parseOnLoad: true"></script> \r
- <script type="text/javascript"> \r
- dojo.require("dojox.grid.Grid"); \r
- dojo.require("dojo.data.ItemFileWriteStore"); \r
- dojo.require("dojo.parser"); \r
- dojo.require("dijit.form.Button"); \r
- </script> \r
- <script type="text/javascript"> \r
- function getRow(inRowIndex){ \r
- return ' ' + inRowIndex; \r
- }\r
-\r
- var layoutCountries = [ \r
- // view 0 \r
- { type: 'dojox.GridRowView', width: '20px' }, \r
- // view 1 \r
- { cells: [[{ name: "Row", get: getRow, width: 5}]], noscroll: true}, \r
- // view 2 \r
- { cells: [[ \r
- { name: "field 0", field: 0, width: 8 }, \r
- { name: "field 1", width: 8 } \r
- ]]} \r
- ];\r
- \r
- var emptyData = { identifier: 'name', label: 'name', items: []}; \r
- var jsonStore = new dojo.data.ItemFileWriteStore({data: emptyData}); \r
- var numItems = 0; \r
- </script> \r
-</head> \r
-<body class="tundra"> \r
- <h5>dojox.Grid using initially-empty Dojo.Data write stores and then adding an item. Item should show up correctly (no "?"s) when added.</h5> \r
- <br> \r
- <span dojoType="dojox.grid.data.DojoData" \r
- jsId="dataModel" \r
- rowsPerPage="20" \r
- store="jsonStore" count="0"> \r
- </span> \r
- <div id="grid" dojoType="dojox.Grid" elasticView="2" \r
- model="dataModel" structure="layoutCountries"> \r
- </div> \r
- <button dojoType="dijit.form.Button"> \r
- <script type="dojo/method" event="onClick"> \r
- numItems++; \r
- jsonStore.newItem({name: numItems + "-person Land", type: "city", population: numItems}); \r
- </script> \r
- Add Item \r
- </button> \r
-</body> \r
-</html>
\ No newline at end of file