Create a Table Name TBL CREATE TABLE TBL
Create a Table Name (TBL) CREATE TABLE TBL (CODE VARCHAR 2(7), NAME VARCHAR 2(20), PARENT VARCHAR 2(7), ICON VARCHAR 2(20))
Open Form Builder and create new form name = first_tree create a data block manually block name =tree add 1 item open property Palate and set item name = test Item type =Hierarchical Tree
Set date query property= SELECT -1, LEVEL, name, ICONs(level), code FROM tbl connect by prior code =parent start with code=27924 This code is a Hint parent off all Icons is faction which is created on database for get Icon of any level -1 that indicate the initiate status of the node (expand 1 or collapse -1) LEVEL, witch is a “CONNECT BY” specific pseudo-column specifies the depth at which the individual node appears. Name that is the visible label of the node ICON that contains the (16 x 16 pixels) icon name of the node (can be NULL) Code that contains the value of the node
Table Data
Create form level trigger WHEN-NEW-FORM-INSTANCE declare htree ITEM; L 1 FTREE. NODE; BEGIN htree : = Find_Item('TREE. test'); ftree. populate_tree(htree); END;
Function Icons (database function) CREATE OR REPLACE function icons(lvl number) return varchar 2 as begin if lvl = 1 then return 'admin_user'; else Icon return 'normal_user'; path end if; end;
Best of luck M. Adnan Tariq Masood Testile Faisalabad
- Slides: 7