Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / property-grid.html
diff --git a/docs/source/property-grid.html b/docs/source/property-grid.html
new file mode 100644 (file)
index 0000000..aebbf9a
--- /dev/null
@@ -0,0 +1,53 @@
+<html>\r
+<head>\r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js">Ext.onReady(function(){\r
+    \r
+    var propsGrid = new Ext.grid.PropertyGrid({\r
+        renderTo: 'prop-grid',\r
+        width: 300,\r
+        autoHeight: true,\r
+        propertyNames: {\r
+            tested: 'QA',\r
+            borderWidth: 'Border Width'\r
+        },\r
+        source: {\r
+            '(name)': 'Properties Grid',\r
+            grouping: false,\r
+            autoFitColumns: true,\r
+            productionQuality: false,\r
+            created: new Date(Date.parse('10/15/2006')),\r
+            tested: false,\r
+            version: 0.01,\r
+            borderWidth: 1\r
+        },\r
+        viewConfig : {\r
+            forceFit: true,\r
+            scrollOffset: 2 // the grid will never have scrollbars\r
+        }\r
+    });\r
+\r
+    // simulate updating the grid data via a button click\r
+    new Ext.Button({\r
+        renderTo: 'button-container',\r
+        text: 'Update source',\r
+        handler: function(){\r
+            propsGrid.setSource({\r
+                '(name)': 'Property Grid',\r
+                grouping: false,\r
+                autoFitColumns: true,\r
+                productionQuality: true,\r
+                created: new Date(),\r
+                tested: false,\r
+                version: 0.8,\r
+                borderWidth: 2\r
+            });\r
+        }\r
+    });\r
+});</pre>    \r
+</body>\r
+</html>
\ No newline at end of file