source: trunk/web/addons/job_monarch/lib/extjs-30/examples/grid/property-grid.js @ 625

Last change on this file since 625 was 625, checked in by ramonb, 15 years ago

lib/extjs-30:

  • new ExtJS 3.0
File size: 1.4 KB
RevLine 
[625]1/*!
2 * Ext JS Library 3.0.0
3 * Copyright(c) 2006-2009 Ext JS, LLC
4 * licensing@extjs.com
5 * http://www.extjs.com/license
6 */
7Ext.onReady(function(){
8   
9    var propsGrid = new Ext.grid.PropertyGrid({
10        renderTo: 'prop-grid',
11        width: 300,
12        autoHeight: true,
13        propertyNames: {
14            tested: 'QA',
15            borderWidth: 'Border Width'
16        },
17        source: {
18            '(name)': 'Properties Grid',
19            grouping: false,
20            autoFitColumns: true,
21            productionQuality: false,
22            created: new Date(Date.parse('10/15/2006')),
23            tested: false,
24            version: 0.01,
25            borderWidth: 1
26        },
27        viewConfig : {
28            forceFit: true,
29            scrollOffset: 2 // the grid will never have scrollbars
30        }
31    });
32
33    // simulate updating the grid data via a button click
34    new Ext.Button({
35        renderTo: 'button-container',
36        text: 'Update source',
37        handler: function(){
38            propsGrid.setSource({
39                '(name)': 'Property Grid',
40                grouping: false,
41                autoFitColumns: true,
42                productionQuality: true,
43                created: new Date(),
44                tested: false,
45                version: 0.8,
46                borderWidth: 2
47            });
48        }
49    });
50});
Note: See TracBrowser for help on using the repository browser.