1. #21
    Sencha User
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    55
    Vote Rating
    0
    rednix is on a distinguished road

      0  

    Default


    Nice job - thanks for this great extension!
    I'm dumping my first steps to achieve a treegrid functionality via a row expander and using this one.
    Besides I found a minor typo/bug in the source code:

    on line 547 change
    Code:
    this.fireEvent('beforeexapndnode', this, rc) !== false
    to
    Code:
    this.fireEvent('beforeexpandnode', this, rc) !== false
    And one question: How can I "drop" the paging functionality on the sub-levels and just provide paging on the root level? I tried using just a default PagingToolbar but that doesn't work. The total count of elements shows correctly but all other numbers are displayed as 'NaN' in the toolbar.

  2. #22
    Ext User
    Join Date
    Aug 2007
    Posts
    10
    Vote Rating
    0
    Andrewd2 is on a distinguished road

      0  

    Default help!

    help!


    I create TreeGrid in Tab Panel:
    Code:
    var store=new Ext.ux.maximgb.treegrid.AdjacencyListStore({
    	autoLoad: true
    	,leaf_field_name: 'leaf'
    	,parent_id_field_name: 'parentid'
    	,url: config.url
    	,reader: new Ext.data.JsonReader(
    		{
    			root: 'root'
    			,totalProperty: 'total_count'
    			,id: 'id'
    			,successProperty: 'success'
    		}
    		,['title', {name:'id',type:'int'}, {name:'parentid',type:'int'}, 'dtcreate', 'countchilds', {name:'leaf',type:'bool'}]
    	)
    });
    var grid=new Ext.ux.maximgb.treegrid.GridPanel({
    		id:pid
    		,stripeRows: true
    		,title:t
    		,store:store
    		,master_column_id:'title'
    		,autoExpandColumn:'title'
    		,columns:[
    {id:'title',header:'title',align:'left',width:200,sortable:true,dataIndex:'title'}
    ,{id:'id',header:'id',align:'left',width:60,sortable:true,dataIndex:'id'}
    ,{header:'parentid',align:'left',width:60,sortable:true,dataIndex:'parentid'}
    ,{header:'dtcreate',align:'left',width:120,sortable:true,dataIndex:'dtcreate'}
    ,{header:'countchilds',align:'left',width:50,sortable:true,dataIndex:'countchilds'}
    ]
    		,root_title: t
    		,bbar: new Ext.ux.maximgb.treegrid.PagingToolbar({
    			store: store
    			,displayInfo: true
    			,pageSize: 10
    		})
    	});
    this.mainPanel.add(
    	grid
    ).show();
    Then send JSON data:
    1.
    Code:
    {"root":[{"id":"1000000","title":"BD","parentid":"0","dtcreate":"2007-01-22 00:00:00","countchilds":"16","leaf":false}],"success":true,"total_count":1}
    2.
    Code:
    {"root":[{"id":"200000","title":"CP","parentid":"1000000","dtcreate":"2007-01-22 00:00:00","countchilds":"4","leaf":false},{"id":"300000","title":"New","parentid":"1000000","dtcreate":"2007-06-25 11:08:10","countchilds":"3","leaf":false},{"id":"4000062","title":"Main","parentid":"1000000","dtcreate":"2007-08-31 12:41:09","countchilds":"12","leaf":false},{"id":"4000063","title":null,"parentid":"1000000","dtcreate":"2007-08-31 12:43:45","countchilds":"57","leaf":false},{"id":"4000433","title":null,"parentid":"1000000","dtcreate":"2008-01-11 00:06:43","countchilds":"57","leaf":false},{"id":"4000773","title":null,"parentid":"1000000","dtcreate":"2008-02-15 11:39:27","countchilds":"0","leaf":true},{"id":"4000778","title":null,"parentid":"1000000","dtcreate":"2008-02-15 12:01:30","countchilds":"0","leaf":true},{"id":"4000779","title":null,"parentid":"1000000","dtcreate":"2008-02-15 12:02:09","countchilds":"0","leaf":true},{"id":"4000780","title":"Access","parentid":"1000000","dtcreate":"2008-02-15 12:02:43","countchilds":"0","leaf":true},{"id":"4000781","title":"Research","parentid":"1000000","dtcreate":"2008-02-15 12:12:28","countchilds":"0","leaf":true}],"success":true,"total_count":16}
    3.
    Code:
    {"root":[{"id":"202000","title":"Users","parentid":"200000","dtcreate":"2007-01-22 00:00:00","countchilds":"3","leaf":false},{"id":"205000","title":null,"parentid":"200000","dtcreate":"2007-04-11 20:45:06","countchilds":"3","leaf":false},{"id":"206000","title":"All documents","parentid":"200000","dtcreate":"2007-01-22 00:00:00","countchilds":"0","leaf":true},{"id":"400000","title":null,"parentid":"200000","dtcreate":"2007-01-22 00:00:00","countchilds":"37","leaf":false}],"success":true,"total_count":4}
    All works, but childs adds to end of tree, not into parent node....what i do wrong?
    Attached Images

  3. #23
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    495
    Vote Rating
    4
    MaximGB is on a distinguished road

      0  

    Default


    Andrewd2
    Is online demo available?
    Use the force - read the source.

  4. #24
    Ext User
    Join Date
    Aug 2007
    Posts
    10
    Vote Rating
    0
    Andrewd2 is on a distinguished road

      0  

    Default


    Quote Originally Posted by MaximGB View Post
    Andrewd2
    Is online demo available?
    no...

  5. #25
    Ext User
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    kukusz is on a distinguished road

      0  

    Default


    Excellent job, this is going to be very useful.

    Can someone explain how the _lft and _rgt parameters are used to determine the nesting? I've spent some time digging around the code but I'm getting nowhere at this point.

  6. #26
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    495
    Vote Rating
    4
    MaximGB is on a distinguished road

      0  

    Default


    Code:
    root
     +-a
     +-b
     | +-c
     | +-d
     +-e
              _lft                          _rgt
    _level 1: <1--------------root------------12>
    _level 2:  <2-a-3><4------b------9><10-e-11>
    _level 3:           <5-c-6><7-d-8>
    Use the force - read the source.

  7. #27
    Ext User
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    kukusz is on a distinguished road

      0  

    Default


    Nice! Thanks

  8. #28
    Ext User
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    sszach is on a distinguished road

      0  

    Default


    Quote Originally Posted by MaximGB View Post
    Code:
    root
     +-a
     +-b
     | +-c
     | +-d
     +-e
              _lft                          _rgt
    _level 1: <1--------------root------------12>
    _level 2:  <2-a-3><4------b------9><10-e-11>
    _level 3:           <5-c-6><7-d-8>
    @MaximGB

    how did you generate the _lft and _rgt values in your johnson&johnson example?

  9. #29
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    495
    Vote Rating
    4
    MaximGB is on a distinguished road

      0  

    Default


    There is examples/tools directory in the extension archive, you can see generation code there.
    Use the force - read the source.

  10. #30
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    MaGo is on a distinguished road

      0  

    Smile I need a very basic example.!

    I need a very basic example.!


    Ok, i'm trying to make a TreeGrid based on the user request, the app should start without any node on the tree.

    Would you please tell me a really really basic example of how can I add a root node to the grid and therefore adding a child node to the clicked row, and generate the _lft & _rgt values?

    Thank you for your great work, it looks great.!

Thread Participants: 142

  1. galdaka (5 Posts)
  2. Condor (1 Post)
  3. Choleriker (2 Posts)
  4. bidyut (2 Posts)
  5. LorenzoW (2 Posts)
  6. Razhick (3 Posts)
  7. mystix (3 Posts)
  8. ap (1 Post)
  9. John Sourcer (8 Posts)
  10. pateati (2 Posts)
  11. AlxH (1 Post)
  12. temporary (5 Posts)
  13. Ytorres (2 Posts)
  14. hallikpapa (1 Post)
  15. Ronaldo (2 Posts)
  16. mjlecomte (8 Posts)
  17. eseguin3 (1 Post)
  18. smokeman (5 Posts)
  19. rekam (3 Posts)
  20. rednix (4 Posts)
  21. iamleppert (4 Posts)
  22. Andrewd2 (3 Posts)
  23. gdodinet (7 Posts)
  24. anthony-apd (5 Posts)
  25. derbbre (1 Post)
  26. wm003 (1 Post)
  27. pebbz (1 Post)
  28. mabello (1 Post)
  29. vendiddy (1 Post)
  30. sugen (1 Post)
  31. flyzb (4 Posts)
  32. nanich (2 Posts)
  33. vector (2 Posts)
  34. Rieglflo (1 Post)
  35. tonedeaf (3 Posts)
  36. robryals (2 Posts)
  37. brumby007 (1 Post)
  38. josh803316 (4 Posts)
  39. GokhanNL (1 Post)
  40. NeonMonk (1 Post)
  41. vizcano (8 Posts)
  42. lucasjedi (1 Post)
  43. jenner (1 Post)
  44. w3bbuilder (1 Post)
  45. johnsbrn (1 Post)
  46. salvo (2 Posts)
  47. Armen Orduyan (3 Posts)
  48. glbboy (1 Post)
  49. matmat (1 Post)
  50. jacu (1 Post)
  51. Rontegen (1 Post)
  52. sdileep (1 Post)
  53. rule3 (1 Post)
  54. demongloom (2 Posts)
  55. mathieuj (2 Posts)
  56. xsuniwov (5 Posts)
  57. anilsonawane (9 Posts)
  58. wiulma (1 Post)
  59. lanex (1 Post)
  60. Karmaresh (1 Post)
  61. gthe (1 Post)
  62. arikkfir (2 Posts)
  63. nrgie (2 Posts)
  64. Anitha (2 Posts)
  65. dzj (1 Post)
  66. kukusz (2 Posts)
  67. sszach (2 Posts)
  68. Benjamin Ansbach (1 Post)
  69. MaGo (1 Post)
  70. wishamster (1 Post)
  71. JSRobbie (1 Post)
  72. mama (17 Posts)
  73. hoanganhinfo (2 Posts)
  74. huggy06 (1 Post)
  75. queej (1 Post)
  76. skaue (16 Posts)
  77. jxl_zyj (1 Post)
  78. changhua (3 Posts)
  79. pawel_filip (1 Post)
  80. fxmisticat (1 Post)
  81. NaveenMinchu (1 Post)
  82. Trinad (2 Posts)
  83. s.lothary (1 Post)
  84. DyNaMo (11 Posts)
  85. wki01 (1 Post)
  86. Gareth Bult (4 Posts)
  87. Trifling (1 Post)
  88. Xander75 (2 Posts)
  89. mschwartz (3 Posts)
  90. geeroc (2 Posts)
  91. Joel Vennin (2 Posts)
  92. Dumas (1 Post)
  93. s.m.srinivas (1 Post)
  94. krudz (1 Post)
  95. boedie_m (2 Posts)
  96. kirit80 (2 Posts)
  97. raby (3 Posts)
  98. Izhaki (3 Posts)
  99. liqingzhu (1 Post)
  100. jej2003 (1 Post)
  101. Chods (1 Post)
  102. florian_cargoet (1 Post)
  103. Erwan62 (8 Posts)
  104. kay.liong (3 Posts)
  105. tianleifeng (1 Post)
  106. Bdfy (1 Post)
  107. gabrieaj (1 Post)
  108. JK. (1 Post)
  109. larry yang (1 Post)
  110. ErMenda (1 Post)
  111. fabito (2 Posts)
  112. u9717410 (3 Posts)
  113. vijaya (1 Post)
  114. lovebread (5 Posts)
  115. kleeb (1 Post)
  116. gemsr.forever (1 Post)
  117. tot2ivn (1 Post)
  118. ikis (1 Post)
  119. Jonny5 (1 Post)
  120. itaymesh (1 Post)
  121. taxidriver (3 Posts)
  122. sdesalas (1 Post)
  123. binoruv (1 Post)
  124. irscomp (2 Posts)
  125. miha-ha (3 Posts)
  126. stranieroinpatria (1 Post)
  127. ryanfebus (1 Post)
  128. docxa (5 Posts)
  129. gopanothera (1 Post)
  130. usan_AT (1 Post)
  131. wallynm (1 Post)
  132. W65138497 (1 Post)
  133. Chilicat (1 Post)
  134. lfs2008 (1 Post)
  135. lukefowell89 (1 Post)
  136. vivek.damco (3 Posts)
  137. jc999 (1 Post)
  138. rauer (1 Post)
  139. D@nte (1 Post)
  140. Patrick86 (1 Post)
  141. Priya R (1 Post)
  142. pdommara@gmail.com (1 Post)
Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi