4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
12 Roo.BLANK_IMAGE_URL = "../../images/default/s.gif";
15 Roo.onReady(function(){
\r
17 // create the Data Store
\r
18 var ds = new Roo.data.Store({
\r
20 proxy: new Roo.data.HttpProxy({url: 'sheldon.xml'}),
\r
22 // the return will be XML, so lets set up a reader
\r
23 reader: new Roo.data.XmlReader({
\r
24 // records will have an "Item" tag
\r
27 totalRecords: '@total'
\r
29 // set up the fields mapping into the xml doc
\r
30 // The first needs mapping, the others are very basic
\r
31 {name: 'Author', mapping: 'ItemAttributes > Author'},
\r
32 'Title', 'Manufacturer', 'ProductGroup'
\r
36 var cm = new Roo.grid.ColumnModel([
\r
37 {header: "Author", width: 120, dataIndex: 'Author'},
\r
38 {header: "Title", width: 180, dataIndex: 'Title'},
\r
39 {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer'},
\r
40 {header: "Product Group", width: 100, dataIndex: 'ProductGroup'}
\r
42 cm.defaultSortable = true;
\r
45 var grid = new Roo.grid.Grid('example-grid', {
\r