Opened 11 years ago

Last modified 9 years ago

#11718 closed defect

dynamic treegrid for multiple dojo in one page — at Initial Version

Reported by: barry Owned by: anonymous
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


Hi, When I program a treegrid in one page, if there is only one verion dojo used, it works well, but when I declare another dojo first and then use my code, it always show the error: "Sorry, an error occurred". I am not sure if it is my code wrong or it is a treegrid bug? My dojo version is 1.0 and 1.5.0. My code is as below:

<html> <head></head> <body class="tundra"> <!-- <script type="text/javascript" src="/mydojo10/dojo/dojo.js" djConfig="parseOnLoad:true, isDebug:true"> </script> -->

<link rel='stylesheet' href='/myDojo15/dojo/resources/dojo.css'> <link rel='stylesheet' href='/myDojo15/dojox/grid/resources/Grid.css'> <link rel='stylesheet' href='/myDojo15/dojox/grid/resources/tundraGrid.css'>

<div id='grid_Test'></div> <script type="text/javascript">

djConfig = {isDebug: true,parseOnLoad: false, baseUrl:'/mydojo15/dojo/',scopeMap: dojo", "dojo15"],["dijit", "dijit15"],["dojox", "dojox15?}

</script> <script type="text/javascript" src="/mydojo15/dojo/dojo.js" djConfig="parseOnLoad:true, isDebug:true"> </script> <script type="text/javascript">

dojo.require("dojox.grid.TreeGrid?"); dojo.require("dijit.tree.ForestStoreModel?"); dojo.require(""); var data = {

identifier: 'id', label: 'name', items: [

{ id: '1', name:'Test 1', num:'900', result: 'Success',type:'master',

children:[{_reference:'2'}, {_reference:'3'}, {_reference:'4'}] },

{ id: '2', name:'Test 1.1', num:'900', result: 'Success'}, { id: '3', name:'Test 1.2', num:'1200', result: 'Failed'}, { id: '4', name:'Test 1.3', num:'2300', result: 'Success'}



var layout = [

{ name: "Name", field: "name", width: "auto" }, { name: "Number", field: "num", width: "auto"}, { name: "Result", field: "result", width: "auto" }


var store = new{ data: data });

var model = new dijit.tree.ForestStoreModel?({

store: store, query: { type: 'master' }, childrenAttrs: children?

}); var grid = new dojox.grid.TreeGrid?({

treeModel: model, structure: layout

}, 'grid_Test'); dojo.addClass(grid.domNode, "grid"); grid.startup();



</body> </html>

Thanks you!!

Change History (0)

Note: See TracTickets for help on using tickets.