KoolTreeView - Great PHP TreeViewKoolTreeView - Great PHP TreeViewFullVersion 3.0.0.2 released on 25/11/2016

Advances - State Persistent With Database

  • Local Disk(C:)
    • Hardware
      • Asus.doc
      • Intel.doc
      • WindowXP.doc
    • Software
      • Linux.doc
      • AMD.doc
    • E-books
    • Recycle

Description & Sample code

The example show how you can save KoolTreeView's state to database. In this example, you can:

  • - Create new file node under folder node.
  • - Delete any file node.
  • - Move the file node to another folder node.
  • - Change order among file nodes with drag and drop.
  • - Rename file node or folder node by double click.
  • - Expand/Collapse folder node

*Note: All changes will be saved to database. State of TreeView will be persistent on the next visit.

Below is example's sample data:

-------------------------------------------------------------------------------------------------------------------------------
|         ID         |      ParentID      |        Text        |       Image        |       Expand       |        Rank        |
-------------------------------------------------------------------------------------------------------------------------------
| amd                | software           | AMD.doc            | doc.gif            |                  0 |                  2 |
-------------------------------------------------------------------------------------------------------------------------------
| asus               | hardware           | Asus.doc           | doc.gif            |                  0 |                  1 |
-------------------------------------------------------------------------------------------------------------------------------
| ebook              | root               | E-books            | Folder.gif         |                  1 |                  4 |
-------------------------------------------------------------------------------------------------------------------------------
| hardware           | root               | Hardware           | Folder.gif         |                  1 |                  1 |
-------------------------------------------------------------------------------------------------------------------------------
| intel              | hardware           | Intel.doc          | doc.gif            |                  0 |                  2 |
-------------------------------------------------------------------------------------------------------------------------------
| linux              | software           | Linux.doc          | doc.gif            |                  0 |                  1 |
-------------------------------------------------------------------------------------------------------------------------------
| macos              |                    | MacOs.doc          | doc.gif            |                  0 |                  1 |
-------------------------------------------------------------------------------------------------------------------------------
| recycle            | root               | Recycle            | xpRecycle.gif      |                  1 |                  5 |
-------------------------------------------------------------------------------------------------------------------------------
| software           | root               | Software           | Folder.gif         |                  1 |                  2 |
-------------------------------------------------------------------------------------------------------------------------------
| windowxp           | hardware           | WindowXP.doc       | doc.gif            |                  0 |                  3 |
-------------------------------------------------------------------------------------------------------------------------------