3 * Copyright(c) 2006-2009 Ext JS, LLC
5 * http://www.extjs.com/license
7 Ext.onReady(function(){
\r
9 // create the Data Store
\r
10 var store = new Ext.data.Store({
\r
14 // the return will be XML, so lets set up a reader
\r
15 reader: new Ext.data.XmlReader({
\r
16 // records will have an "Item" tag
\r
19 totalRecords: '@total'
\r
21 // set up the fields mapping into the xml doc
\r
22 // The first needs mapping, the others are very basic
\r
23 {name: 'Author', mapping: 'ItemAttributes > Author'},
\r
24 'Title', 'Manufacturer', 'ProductGroup'
\r
29 var grid = new Ext.grid.GridPanel({
\r
32 {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
\r
33 {header: "Title", width: 180, dataIndex: 'Title', sortable: true},
\r
34 {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
\r
35 {header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
\r
37 renderTo:'example-grid',
\r