Specifies the level of the column data for levelled trees
Member of Tree View Column (PRIM_TVCL)
Data Type - Integer
The Level property determines which level of the tree the field in the Source property should represent. This feature only applies to is a feature of Levelled trees where nesting is automated based on the data and KeyPosition. Tree will automatically create additional items with null values in the fields that do not apply to the Level.
In this example, and 3 level tree shows department, section and employee data. DEPTMENT has a KeyPosition of 1 and is used to identify level 1 items. It is a hidden column and DEPTDESC is used for display. SECTION has a KeyPosition of 1 and is used to identify level 2 items. It is a hidden column and SECDESC is used for display. EMPNO has a KeyPosition of 1 and is used to identify level 3 items. It is a hidden column and FULLNAME is used for display. The tree automatically creates items at the right level based on the data values in the key columns. The fields on the right show the field values for each item.
Function Options(*DIRECT) Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(462) Clientwidth(748) Height(501) Layoutmanager(#TableLayout_1) Left(152) Top(225) Width(764) Define_Com Class(#PRIM_TBLO) Name(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(2) Parent(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Row) Name(#Row_1) Displayposition(1) Parent(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Column) Name(#Column_1) Displayposition(1) Parent(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Item) Name(#Item_1) Column(#Column_1) Manage(#Tree) Parent(#TableLayout_1) Row(#Row_1) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Alignment(TopLeft) Column(#Column1) Flow(Down) Manage(#DEPTMENT) Parent(#TableLayout_1) Row(#Row_1) Sizing(FitToWidth) Margintop(4) Marginleft(4) Marginright(4) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Column(#Column1) Manage(#DEPTDESC) Parent(#TableLayout_1) Row(#Row_1) Sizing(FitToWidth) Alignment(TopLeft) Flow(Down) Margintop(4) Marginleft(4) Marginright(4) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem3) Column(#Column1) Manage(#SECTION) Parent(#TableLayout_1) Row(#Row_1) Sizing(FitToWidth) Alignment(TopLeft) Flow(Down) Margintop(4) Marginleft(4) Marginright(4) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem4) Column(#Column1) Manage(#SECDESC) Parent(#TableLayout_1) Row(#Row_1) Sizing(FitToWidth) Alignment(TopLeft) Flow(Down) Margintop(4) Marginleft(4) Marginright(4) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem5) Column(#Column1) Manage(#EMPNO) Parent(#TableLayout_1) Row(#Row_1) Sizing(FitToWidth) Alignment(TopLeft) Flow(Down) Margintop(4) Marginleft(4) Marginright(4) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem6) Column(#Column1) Manage(#FULLNAME) Parent(#TableLayout_1) Row(#Row_1) Sizing(FitToWidth) Alignment(TopLeft) Flow(Down) Margintop(4) Marginleft(4) Marginright(4) Define_Com Class(#PRIM_TRVW) Name(#Tree) Columnbuttonheight(20) Componentversion(2) Displayposition(1) Fullrowselect(True) Haslines(False) Height(462) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Width(374) Define_Com Class(#PRIM_TVCL) Name(#TreeViewColumn1) Level(1) Parent(#Tree) Source(#DEPTMENT) Keyposition(1) Visible(False) Define_Com Class(#PRIM_TVCL) Name(#TreeViewColumn2) Displayposition(1) Level(1) Parent(#Tree) Source(#DEPTDESC) Sortposition(1) Define_Com Class(#PRIM_TVCL) Name(#TreeViewColumn3) Level(2) Parent(#Tree) Source(#SECTION) Keyposition(1) Visible(False) Define_Com Class(#PRIM_TVCL) Name(#TreeViewColumn4) Displayposition(1) Level(2) Parent(#Tree) Source(#SECDESC) Sortposition(1) Define_Com Class(#PRIM_TVCL) Name(#TreeViewColumn5) Level(3) Parent(#Tree) Source(#EMPNO) Visible(False) Define_Com Class(#PRIM_TVCL) Name(#TreeViewColumn6) Displayposition(1) Level(3) Parent(#Tree) Source(#FULLNAME) Sortposition(1) Define_Com Class(#DEPTMENT.Visual) Name(#DEPTMENT) Displayposition(2) Left(378) Parent(#COM_OWNER) Tabposition(2) Top(4) Width(366) Readonly(True) Define_Com Class(#DEPTDESC.Visual) Name(#DEPTDESC) Displayposition(3) Left(378) Parent(#COM_OWNER) Tabposition(3) Top(29) Width(366) Readonly(True) Define_Com Class(#SECTION.Visual) Name(#SECTION) Displayposition(4) Left(378) Parent(#COM_OWNER) Tabposition(4) Top(54) Width(366) Readonly(True) Define_Com Class(#SECDESC.Visual) Name(#SECDESC) Displayposition(5) Left(378) Parent(#COM_OWNER) Tabposition(5) Top(79) Width(366) Readonly(True) Define_Com Class(#EMPNO.Visual) Name(#EMPNO) Componentversion(1) Displayposition(6) Height(21) Left(378) Parent(#COM_OWNER) Tabposition(6) Usepicklist(False) Width(366) Top(104) Readonly(True) Define_Com Class(#FULLNAME.Visual) Name(#FULLNAME) Displayposition(7) Left(378) Parent(#COM_OWNER) Tabposition(7) Top(129) Width(366) Readonly(True) Evtroutine Handling(#Com_owner.CreateInstance) #Com_owner.Load Endroutine Mthroutine Name(Load) Select Fields(*All) From_File(PSLMST) Fetch Fields(#deptdesc) From_File(Deptab) With_Key(#deptment) Keep_Last(100) Fetch Fields(#secdesc) From_File(Sectab) With_Key(#deptment #section) Keep_Last(100) #Fullname := ("&1, &2 (&3)").Substitute( #Surname #Givename #Empno ) Add_Entry To_List(#Tree) Endselect Endroutine End_Com
Febuary 18 V14SP2