grid not working

C

calverstine

anyone experience in javascript dojo framework?

I tried play around a demo and it seems not working , nothing shows..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<script src="http://localhost/fastphone/js/dojo/dojo/dojo.js"
djConfig="isDebug:false, parseOnLoad: true"></script>
` <style type="text/css">

@import "http://localhost/js/dojo/dojox/grid/_grid/soriaGrid.css";
@import "http://localhost/js/dojo/dijit/themes/soria/soria.css" ;
@import "http://localhost/js/dojo/dojo/resources/dojo.css"
</style>
<script>

/*dojo.require("dijit.form.ValidationTextBox");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dijit.form.DateTextBox");
dojo.require("dijit.form.FilteringSelect");
dojo.require("dijit.form.Form");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.Textarea");
dojo.require("dijit.form.CurrencyTextBox");*/
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojox.grid.Grid");

dojo.require("dojox.grid._data.model");
</script>
<script>
function linkInGrid(){}
var view1 = {
cells: [
[
{name: 'Customer_ID', field:'id'},
{name: 'Given Name', field:'givname'},
{name: 'Name', field:'surname'},
{name: 'Job', field:'job'},
{name: 'Age', field:'age'},
{name: 'Action', get: linkInGrid}
]
]
};
var ddata;
var grid;
var store;
var layout = [ view1 ];
var dummydata = { "identifier": 'id',
"items":[
{ "id": 0,
"givname":"There is",
"surname":"no data ",
"job": "-",
"age": 0}
] };
function createGrid(myData)
{
store = new dojo.data.ItemFileReadStore({jsId: 'jsonStore',data:
myData});
ddata = new dojox.grid.data.DojoData(null,store,{jsId: 'model',
clientSort: true, query: { id: '*' }});
grid = new dojox.Grid({id: "OurGrid", model: ddata});//
onRowMouseOver: keepPopup
dojo.byId("gridContainer").appendChild(grid.domNode);
grid.setStructure(layout);
grid.startup();
}
</script>
</head>

<body class="soria">

<div jsId="gridContainer" id="gridContainer" style="display:block"></
div>
<script>createGrid(dummydata);</script>
</body>
</html>

Hope someone nice could help..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top