initial import
[roojs1] / examples / grid / custom-grid.html
1 <html>\r
2 <head>\r
3 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
4 <title>Customizing the Grid</title>\r
5 \r
6 <link rel="stylesheet" type="text/css" href="../../cssX/roojs-all.css"/>
7     <link rel="stylesheet" type="text/css" href="../../cssX/xtheme-slate.css"/>
8 \r
9      <link rel="stylesheet" type="text/css" href="../../css/roojs-debug.css"/>
10      <script type="text/javascript" src="../../roojs-all.js"></script>   
11    \r
12 <!--\r
13     <script type="text/javascript" src="custom-grid.js"></script>\r
14 -->\r
15     <script type="text/javascript" >\r
16     // create the property grid application (single instance)
17     Roo.BLANK_IMAGE_URL  = "../../images/default/s.gif";
18  \r
19     var CustGrid = function() {\r
20         return {\r
21             init : function() {\r
22                 var propsGrid = new Roo.grid.PropertyGrid('props-grid', {\r
23                     nameText: 'Properties Grid',\r
24                     enableHdMenu: false,\r
25                     viewConfig : {\r
26                         forceFit:true,\r
27                         scrollOffset:2 // the grid will never have scrollbars\r
28                     }\r
29                 });\r
30 \r
31                 propsGrid.setSource({\r
32                     "(name)": "Properties Grid",\r
33                     "grouping": false,\r
34                     "autoFitColumns": true,\r
35                     "productionQuality": false,\r
36                     "created": new Date(Date.parse('10/15/2006')),\r
37                     "tested": false,\r
38                     "version": .01,\r
39                     "borderWidth": 1\r
40                 });\r
41                 \r
42                 propsGrid.render();\r
43             }\r
44         };\r
45     }();\r
46 \r
47     Roo.onReady(CustGrid.init, CustGrid, true);\r
48 \r
49     </script>\r
50 \r
51 <!-- Common Styles for the examples -->\r
52 <link rel="stylesheet" type="text/css" href="../examples.css" />\r
53 </head>\r
54 <body>\r
55 <script type="text/javascript" src="../examples.js"></script><!-- EXAMPLES -->
56
57 See source: <button type="button" onclick="RooDocs.viewSource.show('/custom-grid.html')">custom-grid.html</button>
58 \r
59 <h1>Property Grid</h1>\r
60 \r
61 <!-- a place holder for the grid. requires the unique id to be passed in the javascript function, and width and height ! -->\r
62 <div id="props-grid" style="overflow: hidden; width: 275px;border:1px solid #c3daf9;"></div>\r
63 \r
64 </body>\r
65 </html>\r