Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Can't get tree grid to display my tree.
Tags: TreeGrid
11/06/2010
01:52
Avatar
phamtranquocviet
Member
Members
Forum Posts: 22
Member Since:
06/02/2010
sp_UserOfflineSmall Offline

Hi,

My treegrid shows only the title bar and the header of the grid (My Hierarchy in this case), and Firefox console shows the following errors (in bold below) on initial load of a treegrid. What am I missing? Please help.

$(document).ready
(
    function()
    {
        var hier = $('#hier').jqGrid
        (
            {
                url: 'index.php?func=hier&aAction=loaddata',
                dataType: 'json',
                mType: 'post',
                height: 'auto',
                pager: false,
                loadui: 'disable',
                caption: 'My Hierarchy',
                treeGrid: true,
                treeGridModel: 'nested',
                ExpandColumn: 'Name',
                autowidth: true,
                rowNum: -1,
                ExpandColClick: true,
                treeIcons: {leaf:'ui-icon-document-b'},
                colNames: ['UserID', 'MemId', 'SaleId', 'HierId', 'My Hierarchy','Url'],
                colModel:
                [
                    {name: 'UserId', width:1, hidden:true},
                    {name: 'MemId', width:1, hidden:true},
                    {name: 'SaleId', width:1, hidden:true},
                    {name: 'HierId', width:1, hidden:true},
                    {name: 'Name', width:150, resizable: false, sortable:false},
                    {name: 'Url', width:1, hidden:true}
                ],
                loadError : function(xhr, status, error)
                {
                    console.log(status); => Output = parseerror
                    console.log(error); => Output = TypeError: a is null { message="a is null", more...}                }
            }
        );
    }
);

Here is my initial response from server:

{"page":1,"total":1,"records":1,"rows":{"2":{"cell":["2","2","1","1","QUYEN NGUYEN","http:yahoo.com"

,"0","1","4","false","false"]},"1":{"cell":["1","1","55","55","VIET PHAM","http:yahoo.com","1","2","3"

,"true","false"]}}}
13/06/2010
01:29
Avatar
phamtranquocviet
Member
Members
Forum Posts: 22
Member Since:
06/02/2010
sp_UserOfflineSmall Offline

I switched to xml, and it works fine. Reading other posts seems like datatype = json is having some issue.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
35 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information