[Dojo-interest] Not able to render contents of a dataGrid

Venkatesh venkydaman at yahoo.com
Thu Mar 4 07:48:37 EST 2010


Thanks Jared!

That works fine.

-Venky




________________________________
From: Jared Jurkiewicz <jared.jurkiewicz at gmail.com>
To: dojo-interest at mail.dojotoolkit.org
Sent: Wed, March 3, 2010 7:53:06 PM
Subject: Re: [Dojo-interest] Not able to render contents of a dataGrid

You need to specify a width and a height for the div where you're
attaching the grid.

-- Jared

On Wed, Mar 3, 2010 at 3:26 AM, Venkatesh <venkydaman at yahoo.com> wrote:
> Hi,
>
> I am trying to render a dojox.grid.DataGrid by binding it to a
> dojox.data.jsonPathStore. While loading the page, i am able to see through
> firebug that dom contents have been rendered on to the page, but none shows
> up in the browser itself. The browser comes up blank. Here is the code
> snippet for the html/javascript. Any help would be greatly appreciated. Am
> using dojo 1.3.2
>
> <html>
>     <head>
>
>         <script type="text/javascript"
> src="/app/javascript/dojo/dojo/dojo.js" djConfig="parseOnLoad:true,isDebug:
> true" ></script>
>
>         <link rel="stylesheet" type="text/css"
> href="/app/javascript/dojo/dijit/themes/soria/soria.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/app/javascript/dojo/dojo/resources/dojo.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/app/javascript/dojo/dojox/grid/resources/Grid.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/app/javascript/dojo/dojox/grid/resources/soriaGrid.css"/>
>
>
>         <script type="text/javascript">
>             dojo.require("dojox.data.jsonPathStore");
>             dojo.require("dojox.grid.DataGrid");
>
>             dojo.addOnLoad(function() {
>
>             var layoutTitles = [
>                 [{
>                         field: "siteName",
>                         name: "Site Name",
>                         width: 10
>                     },
>                     {
>                         field: "siteUrl",
>                         name: "Site URL",
>                         width: 10
>                     },
>                     {
>                         field: "siteStatus",
>                         name: "siteStatus",
>                         width: 'auto'
>                     }]];
>
>         var gridStore = new dojox.data.jsonPathStore({data:
> [{siteName:'a',siteUrl:'b',siteStatus:'c'},
>             {siteName:'one',siteUrl:'two',siteStatus:'three'},
>         {siteName:'goog',siteUrl:'goo',siteStatus:'g'}]});
>
>                     var dataGrid = new dojox.grid.DataGrid({store:gridStore,
>                     structure:layoutTitles, defaultHeight:"10em"},
>                 document.createElement('div'));
>
>                 dojo.byId("tableContainer").appendChild(dataGrid.domNode);
>                 dataGrid.startup();
>
>             });
>
>         </script>
>
>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>         <title>JSP Page</title>
>     </head>
>     <body class="soria">
>         <form>
>
>
>                 <div>
>
>                 <div id="tableContainer"></div>
>
>                 </div>
>         </form>
>
>     </body>
> </html>
>
>
> _______________________________________________
> 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
>
>
_______________________________________________
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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20100304/59e30d09/attachment.htm 


More information about the Dojo-interest mailing list