]>
git.proxmox.com Git - extjs.git/blob - extjs/examples/kitchensink/classic/samples/view/grid/XmlGrid.js
2 * This example shows how to create a grid from XML data. The grid is stateful so you can
3 * move or hide columns, reload the page, and come back to the grid in the same state you
6 * The cells are selectable due to use of the `enableTextSelection` option.
8 Ext
.define('KitchenSink.view.grid.XmlGrid', {
9 extend
: 'Ext.grid.Panel',
11 'Ext.grid.column.Column',
12 'KitchenSink.store.Books'
21 stateId
: 'stateXmlGrid',
25 enableTextSelection
: true
30 path
: 'classic/samples/store/Books.js'
33 path
: 'classic/samples/model/grid/Book.js'
38 percentChangeColumnWidth
: 75,
39 lastUpdatedColumnWidth
: 85,
45 percentChangeColumnWidth
: 100,
46 lastUpdatedColumnWidth
: 115,
53 initComponent: function () {
56 me
.width
= this.profileInfo
.width
;
58 {text
: "Author", flex
: 1, dataIndex
: 'Author'},
59 {text
: "Title", width
: 180, dataIndex
: 'Title'},
60 {text
: "Manufacturer", width
: 115, dataIndex
: 'Manufacturer'},
61 {text
: "Product Group", width
: 100, dataIndex
: 'ProductGroup'}
66 this.on('afterlayout', this.loadStore
, this, {
72 loadStore: function() {
73 this.getStore().load();