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
Load at Once Row Order problem
Tags: roworder
07/10/2011
16:01
Avatar
Akshitha
Member
Members
Forum Posts: 8
Member Since:
08/02/2010
sp_UserOfflineSmall Offline

Hi,
    Am using JQGrid 4.1.2 version. In this am facing some problem in tree grid while using Adjacency model (Load at once). Am loading the JSON data from server. Tree grid is getting formed according to the row order from JSON data. Say for ex., Am forming tree grid for Branch & Department. In my query am not able to sort according to the parent child hierarchy. Because around 6 tables i need to join. But i can get the records with proper id, parent, level & is_leaf properties.

    What grid is doing means – just its creating the rows from JSON whatever order it is. So the tree format is not coming up properly. When i click the root node of any department its collapsing the correct child but all children are under different parent(according to my JSON order).

   Below is the data which am getting as a json from my server.

    id     name               level     parent     is_leaf     expanded     loaded
    —–  —————–  ——–  ———  ———-  ———–  ——-
    B1     Shanghai Pvt Ltd   1         (null)     false       true         true
    D3     Finance & Account  2         B1         true        true         true
    D4     Production               2         B1         true        true         true
    D5     Support                   2         B1         true        true         true
    D6     Operation                2         B1         false       true         true
    D13    Software                 2         B1         true        true         true
    D82    BPO                        2         B1         false       true         true
    D76    Sub D12                 3         D1         true        true         true
    D75    Sub D11                 3         D1         true        true         true
    D78    Sub D21                 3         D2         false       true         true
    D84    Operation1             3         D6         true        true         true
    D83    BPO1                     3         D82        false       true         true
    D79    Sub D211              4         D78        false       true         true
    D87    BPO11                   4         D83        true        true         true
    D80    Sub D2111            5         D79        true        true         true
    D1     Admin                     2         B1         false       true         true
    D2     Sales                      2         B1         false       true         true
    B13    Beijing Pvt Ltd       1         (null)     false       true         true
    D86    Test 2                   2         B13        false       true         true
    D134   Test Root             2         B13        true        true         true
    D91    Test Level 1          3         D85        false       true         true
    D93    Test 2 Level 1       3         D86        true        true         true
    D133   Test Level 3         5         D92        true        true         true
    D92    Test Level 2          4         D91        false       true         true
    D85    Test                       2         B13        false       true         true
    B14    Branch Office 3     1         (null)     false       true         true
    D132   Software               2         B14        false       true         true
    D95    Level 1                   3         D132       true        true         true
    D94    Root                       2         B14        true        true         true
    D136   Level 2                  3         D132       true        true         true
    B15    Branch Office 4      1         (null)     true        true           true

    Inside jqgrid function i've defined all these..
        treeGrid: true,
        treeGridModel:'adjacency',
        ExpandColumn : 'deptName'

    anything am i missing/doing wrong or this is how tree grid works right now??

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
45 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