-
1 Jan 2010 10:48 AM #1
Unanswered: Grid Problem
Unanswered: Grid Problem
Hello,
I have a situation regarding the Grid. Please let me know whats wrong with my following lines of coding.
<html>
<head>
<title>Grid</title>
<link rel="stylesheet" type="text/css" href="../extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="../extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../extjs/ext-all.js"></script>
<script>
Ext.onReady(function(){
var store = new Ext.data.Store({
data:
[
[ 1, "Office Space", "Mike Judge", "02/19/1990", 1, "Work Sucks" ],
[ 2, "Super Troopers", "Jay Chandrasekhar", "02/15/2002", 1, "Altered State Police" ]
],
reader: new Ext.data.ArrayReader({id:'id'},
[ 'id', 'title', 'director', {name: 'released', type: 'date', dateFormat: 'm/d/Y'}, 'genre', 'tagline' ]
});
// add your data store here
var grid = new Ext.grid.GridPanel({
renderTo: Ext.getBody(), //document.body,
frame:true,
title: 'Movie Database',
height:200,
width:500,
store: store,
columns:
[
{header:"Title", dataIndex:'title'},
{header:"Director", dataIndex:'director'},
{header:"Released", dataIndex:'released', renderer: Ext.util.Format.dateRenderer('m/d/Y')},
{header:"Genre", dataIndex:'genre'},
{header:"Tagline", dataIndex:'tagline'}
]
});
});
</script>
</head>
</html>
Please help.
Thanks & Regards.
-
1 Jan 2010 5:42 PM #2
Load up firebug and look at the console. And get yourself a syntax color coding editor. Missing a left paren in your store.
PHP Code:var store = new Ext.data.Store({
data:
[
[ 1, "Office Space", "Mike Judge", "02/19/1990", 1, "Work Sucks" ],
[ 2, "Super Troopers", "Jay Chandrasekhar", "02/15/2002", 1, "Altered State Police" ]
],
reader: new Ext.data.ArrayReader({id:'id'},
[ 'id', 'title', 'director', {name: 'released', type: 'date', dateFormat: 'm/d/Y'}, 'genre', 'tagline' ]
) // Missing left paren
});
-
2 Jan 2010 9:02 AM #3
Thanks a lot , please help
Thanks a lot , please help
Hello cerad,
Thanks a lot for the kind reply and help me to find out the solution.
I will be obliged if you kindly reply on my following queries.
1. How do I get a good editor to write Ext programs ?
2. How to grab the Ext JS quickly ? Is there any good sites / tutorials ?
3. How to install Firebug in a browser which is not connected with the internet ?
I will look forward to your kind reply.
Thanks & Regards.
-
2 Jan 2010 10:08 AM #4


Reply With Quote