Results 1 to 2 of 2

Thread: Preventing reordering in certain nodes of TreePanel

  1. #1

    Question Preventing reordering in certain nodes of TreePanel

    Hi Folks,

    I'm new to Ext JS but/and eager to learn! I love the Tree stuff and it comes in very handy! But unfortunatly I'm having problems preventing certain ordering.

    ( My native language ain't english but I'll try to express myself the best I can .. I hope everything is clear enough.. )

    I have , for example this structure:

    - School
    + Year 1
    * Group 1
    Student 1
    Student 2
    Student 3
    ..

    * Group 2
    Student 1
    Student 2
    Student 3
    ..

    * ...

    + Year 2
    * Group 1
    Student 1
    ..

    * Group 2
    Student 1
    Student 2
    Student 3
    ..

    * ..

    This structure is builded using a Lazy tree, so everytime you open a node, it's contents are loaded using a PHP callback script ( I modified this example :
    http://dev.sencha.com/deploy/dev/examples/tree/reorder.html
    to fit my needs )

    Now what I'm trying to achieve is that Students can be reordered within Groups but ONLY within groups ( so they can not be losely dropped within years ( they have to be connected to a Group ). I got this logic working by using the allowDrag and allowDrop configuration options.

    ( now coming to my main problem )

    Apart from that I'm also trying to make it so that Groups can be reordered within Years. These Groups on the other hand may not be placed inside another group or in or in the rootnode ' School ' .

    So this structure should not be allowed :

    + Year 2
    * Group 1
    Student 1
    ..

    * Group 2
    Student 1
    Student 2
    Student 3
    Group 3
    Student 1
    ...

    Can this logic be achieved using the allowDrop or/and allowDrag configuration options? If not are their other ways to achieve this?

    I hope I made myself clear and if not I'm verry happy to provide further information!

    Greetings from a Ext JS noobie!
    Sam Vloeberghs
    Last edited by sam.vloeberghs; 9 Nov 2010 at 4:50 AM. Reason: extra info

  2. #2

Similar Threads

  1. reordering nodes and leafs of a tree
    By Nikolajtesla in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 30 Oct 2010, 11:55 PM
  2. Replies: 12
    Last Post: 11 Jun 2010, 2:21 PM
  3. TreePanel nodes reordering inside a viewport region
    By Vittorio Fallaci in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 20 Apr 2010, 12:27 AM
  4. reordering in TreePanel inside own level
    By Hacker-CB in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 12 Aug 2009, 3:34 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •