<Html>
<Head>
<Title> Grid example in Ext </title>
<Link rel = "stylesheet" type = "text/css"
Href = "../AllRes/resources/css/ext-all.css"/>
<Script type = "text/javascript" src = "../AllRes/adapter/ext-
Base. js "> </script>
<Script type = "text/javascript" src = "../AllRes/ext-all.js"> </script>
<Script>
// Sort IDS
Ext. onReady (function (){
Var cm = new Ext. grid. ColumnModel ([
{Header: 'number', dataIndex: 'id', sortable: true },
{Header: 'name', dataIndex: 'name '},
{Header: 'description', dataIndex: 'desc '}
]);
Var data = [
['1', 'name1', 'scn1 '],
['2', 'name2', 'scn2 '],
['3', 'name3', 'desc3'],
['4', 'name4', 'scn4 '],
['5', 'name3', 'desc5']
];
Var ds = new Ext. data. Store ({
Proxy: new Ext. data. MemoryProxy (data ),
Reader: new Ext. data. ArrayReader ({},[
{Name: 'id '},
{Name: 'name '},
{Name: 'desc '}
])
});
Ds. load ();
Var grid = new Ext. grid. GridPanel ({
El: 'grid ',
Ds: ds,
Cm: cm
});
Grid. render ();
});
</Script>
</Head>
<Body>
<Div id = "grid"> </div>
</Body>
</Html>