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