Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does anyone have a simple example of a working DojoX Grid control ?
02-02-2011, 10:08 AM
Post: #1
Does anyone have a simple example of a working DojoX Grid control ?
I'm trying to add a DojoX Grid control to my website, but I can't get it to work. I'd like a simple example to start from, but there doesn't seem to be one anywhere. These are my requirements:

I need an example of the 1.2 Grid
It should load the Dojo libraries from googleapis.com (or AOL's servers; not the trunk code or the Dojo code hosted one some private server)
Other than loading the Dojo code from a public server, all the rest of the code should be contained in the HTML page. No loading data from another URL; I'm trying to get the Grid working; then I'll worry about dynamically loading data.
Amazingly, I can't find anything that meets all three requirements. Does anything know of one?
Find all posts by this user
Quote this message in a reply
02-02-2011, 10:10 AM (This post was last modified: 02-02-2011 10:14 AM by tutorials4u.)
Post: #2
RE: Does anyone have a simple example of a working DojoX Grid control ?
Here you go:

Started with the standard Dojox Grid test page
Fixed CSS imports a la:

@import "http://ajax.googleapis.com/ajax/libs/dojo/1.2.3/dojox/grid/resources/Grid.css";

Loaded cross domain Dojo:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.2.3/dojo/dojo.xd.js" djConfig="isDebug:false, parseOnLoad: false">

...with parseOnLoad set to false.

Imported function that declares test_store and gave it a name:

loadStore = function(){ // some sample data

Started everything once all dojo.required classes had loaded:

dojo.addOnLoad( function(){ loadStore(); dojo.parser.parse() } );
Find all posts by this user
Quote this message in a reply
02-02-2011, 10:12 AM (This post was last modified: 02-02-2011 10:13 AM by vijay.)
Post: #3
RE: Does anyone have a simple example of a working DojoX Grid control ?
thanks. This works.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:



Send your comments, Suggestions or Queries regarding this site at info@tutorials4u.net

Copyright © 2010 Tutorials4u.net All Rights Reserved