Opened 12 years ago

Closed 9 years ago

#11718 closed defect (patchwelcome)

dynamic treegrid for multiple dojo in one page

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

Description (last modified by bill)

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:

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

<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 type="text/javascript" src="/mydojo15/dojo/dojo.js" djConfig="parseOnLoad:true, isDebug:true">
<script type="text/javascript">
    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");


Thanks you!!

Change History (4)

comment:1 Changed 11 years ago by Chris Mitchell

Owner: anonymous deleted

comment:2 Changed 10 years ago by bill

Component: GeneralDojoX Grid
Description: modified (diff)
Owner: set to Evan

comment:3 Changed 9 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:4 Changed 9 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.