dojox.grid.DataGrid using multiple store implementations.
This page demonstrates the Grid can display data accessed by dojo.data
implementing Datastores. Each of the datastores used stores data in a
different format, and as this test and demonstration page shows, the
logic for rendering the data is virtually identical. You define your
source store and then you define the layout, which maps the data
attribute names to columns in the grid. You can even perform
cusomization of what is displayed, as demonstrated in the
dojox.data.FlickrStore layout. The image url is displayed as a
clickable link that opens a new page.
The choice of stores used were ones that did not require back end
services to function for sake of simplicity. There is no reason that
dojox.data.QueryReadStore could not be used with grid as well, it just
requires a back end service to send it the query results.
Stores used:
dojo.data.ItemFileReadStore
dojox.data.CsvStore
dojox.data.XmlStore
dojox.data.FlickrStore
dojox.data.OpmlStore
dojox.data.HtmlTableStore
dojo.data.ItemFileReadStore:
Displays a list of countries through ItemFileReadStore format.
Row
name
type
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Africa
continent
Egypt
country
Kenya
country
Nairobi
city
Mombasa
city
Sudan
country
Khartoum
city
Asia
continent
China
country
India
country
Russia
country
Mongolia
country
Oceania
continent
Australia
country
Europe
continent
Germany
country
France
country
Spain
country
Italy
country
North America
continent
Mexico
country
Mexico City
city
Guadalajara
city
Canada
country
Ottawa
city
Toronto
city
United States of America
country
South America
continent
Brazil
country
Argentina
country
dojox.data.CsvStore:
Displays a list of movies that were stored in CSV format.
Row
Title
Year
Producer
1
2
3
4
5
6
7
City of God
2002
Katia Lund
Rain
...
Christine Jeffs
2001: A Space Odyssey
...
Stanley Kubrick
This is a "fake" movie title
1957
Sidney Lumet
Alien
1979
Ridley Scott
The Sequel to "Dances With Wolves."
1982
Ridley Scott
Caine Mutiny, The
1954
Dymtryk "the King", Edward
dojox.data.XmlStore:
Displays a list of books that were stored in XML format.
Row
title
isbn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Title of 1
1
Title of 2
2
Title of 3
3
Title of 4
4
Title of 5
5
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
dojox.data.FlickrStore:
Displays Flickr imformation on 3DNY (Dojo Developer Days, New York) from the flickr public photo feed, accessed via the FlickrStore dojo.data implementation.
Row
Title
Image URL
Loading...
dojox.data.OpmlStore:
Scans an Opml based document for all items of type 'country'