Results 1 to 5 of 5

Thread: DragDrop Tree Save position MySQL

  1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    16

    Default DragDrop Tree Save position MySQL

    Hello!

    I have a working menu, which obtains data from the MySQL database. Now I would like to upgrade menu in such a way that would allow the dragdrop function (enableDD,draggable) and then save the position in MySQL database.

    Here is my Tree menu code:

    Code:
    var Tree_Category_Loader = new Ext.tree.TreeLoader({
         dataUrl   :"_include/class.tree.php"
    })
        
    var Tree_Category = new Ext.tree.TreePanel({
            collapsible      : false,
            animCollapse     : false,
            id               : "tree_projectcategory",
            el               : "tree_projectcategory",
            autoScroll       : true,
            draggable        : false,
            animate          : true,
            enableDD         : false,
            containerScroll  : true,
            autoHeight         : true,
            rootVisible         : false,
            singleClickExpand: true,     
            width            : 300,
            loader           : Tree_Category_Loader
    })
    // SET the root node.
    var Tree_Category_Root = new Ext.tree.AsyncTreeNode({
            text        : 'Start',
            draggable    : false,
            id            : '0'                  // this IS the id of the startnode
    })

    Can you help me?

  2. #2
    Sencha User
    Join Date
    Mar 2008
    Posts
    566

    Default

    Puzo,

    Look at the sample at

    http://extjs.com/deploy/dev/examples/tree/reorder.html

    Then you can use getChecked() to get the info you need, I think.

    http://extjs.com/deploy/dev/docs/?cl...tree.TreePanel

    I use it like mytree.getChecked('id'). But I think you may want to get the parentNode as well and then take that array and post it in a form via a hidden field or with ajax directly.

    Marty

  3. #3
    Ext User
    Join Date
    Mar 2009
    Posts
    16

    Default

    Thank you for your quick answer. But currently I am not sure where to put what. Can you help me with that ?

    Thanks

  4. #4
    Ext User
    Join Date
    Mar 2009
    Posts
    16

    Default

    Anyone have maybe working example?

  5. #5

    Default

    I have the same problem and recently I found this example

    http://extjs.com/deploy/ext/examples...ependency.html

    I hope this help you,

    jetm

Posting Permissions

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