How to create columns dinamically
Posted: Thu Nov 03, 2016 2:33 am
Hi everyone,
I am trying to instantiate columns in a list (WEB) dinamically.
Some ideas?
Below a snippet of code (not compiling the line where I am trying to set the source) of my test.
Thank you
Andrea
I am trying to instantiate columns in a list (WEB) dinamically.
Some ideas?
Below a snippet of code (not compiling the line where I am trying to set the source) of my test.
Thank you
Andrea
Code: Select all
Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(1) Height(800) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Width(1200) Selectionstyle(All) Rowheight(22) Rowlines(False) Columnlines(False) Checkboxes(True)
Define_Com Class(#PRIM_KCOL<#PRIM_LIST.String #STD_NUM>) Name(#KCOL_column_list) Style(Collection)
Define_Com Class(#PRIM_KCOL<#STD_ALPHA #STD_NUM>) Name(#KCOL_column_value) Style(Collection)
Evtroutine Handling(#COM_OWNER.CreateInstance)
Set_Ref Com(#KCOL_column_list<1>) To(*CREATE_AS #PRIM_LIST.String)
Set_Ref Com(#KCOL_column_value<1>) To(*CREATE_AS #STD_ALPHA)
#KCOL_column_list<1>.Parent <= #List1
#KCOL_column_list<1>.DisplayPosition := 1
#KCOL_column_list<1>.Columncaptiontype := Caption
#KCOL_column_list<1>.ColumnCaption := 'Colonna 1'
#KCOL_column_list<1>.Source := #KCOL_column_value<1>
#KCOL_column_value<1> := 'test'
Add_Entry To_List(#List1)
* Create second column and so on...
Endroutine