[Dojo-interest] Need a little guidance on which widgets to use

Peter Svensson psvensson at gmail.com
Wed Mar 10 03:23:00 EST 2010

What you need to do to get data out of a store, is use the fetch function.
Examples can be found here;

<http://docs.dojocampus.org/dojo/data/api/Read>Since you create a store
first which you then use when creating the grid, the grid knows how to get
data out of the store.
To take out data from the store 'manually', you do like this;

var store = new some.Datastore();var gotItems = function(items, request){
  console.log("Number of items located: " +
items.length);};store.fetch({onComplete: gotItems});

This will call the gotItems function once for each item in the store. If you
want to filter out one or several specific items, you can add a query
paramter, so that the call look like;

store.fetch({query: {name: "a*"}, onComplete: gotItems});

Should fetch all items where the property 'name' begins with an 'a'.


On Wed, Mar 10, 2010 at 6:35 AM, onederlnd <onederlnd at gmail.com> wrote:

> I'll right off the bat admit that I'm new to Dojo and even AJAX/Javascript
> coding so please excuse me if this may seem simple to some.
> I am looking for a little guidance on where to look for what I'm trying to
> accomplish with my Grid.
> 1: Currently I use an XML database which has all my clients information.  I
> am looking to do a mathematical equation to figure out their age based on
> the birthdate in the XML file minus the current month/year and then that
> information is imputed into an Age column within the grid (this would be
> done without writing the actual age into the XML file.  At the moment I'm
> using dojox.grid.DataGrid and dojox.data.XmlStore as well if that makes a
> difference.
> 2: The second problem I'm having is displaying database information in a
> different spot other than in grid, such as clicking on a grid row and the
> info showing up in a separate ContentPane.  I have seen it done but can't
> figure out how to get it working.
> I do appreciate anyone taking the time out to help me and apologized for my
> stupidity when it comes to Dojo and the workings of it.
> --
> View this message in context:
> http://n3.nabble.com/Need-a-little-guidance-on-which-widgets-to-use-tp439093p439093.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Don't miss the hottest event of 2010: Scandinavian Web Developer Conference:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20100310/5f6e5794/attachment.htm 

More information about the Dojo-interest mailing list