Listbox and ListView

is it possible to populate listbox and listview with more than one column ?
Have you looked at the Canvas Section ‘TreeGrid‘ control? Specify the text for the ‘Header labels’ and a SQL Select statement for ‘List items’. In the ‘click’ event you can get x.CurrentItem.text, CurrentItem being the currently selected treeitem object.
Or, in a Form Section, you can use the Grid gadget for multiple columns.
If there is a reason you HAVE to use a list instead of grid, you could concatenate the result of a query, but I don’t recommend it.
This would work, but it would look ugly unless you forced some blank characters in to align it.

select first_name+" "+last_name from example

LIST VIEW. I noticed that you can set text as items, can I populate it with table fields?
I add the items by using additems().
Like so.
I named the listview gadget list1.

mylistview.additems("select last_name from example")

tried this;

field1 is in a canvas section with listbox
testadress is the table.

proc page1_section1_field1_ready()
x.additems="select name from testadress"

Also in Load or activate.
Does’nt work, listbox won’t populate, stay’s empty.
Tried it in Form section with List view, same result.
Additems() is a method not a property.
replace this

x.additems="select name from testadress"

With this

x.additems("select name from testadress")

in which event additems method can be used to load initial value in the list or combo item when the app starts.
Use the ‘ready’ event. During development in the Lianja App Builder, the ‘ready’ event is called when the App is loaded, so just save and reload the App to force the ‘ready’ event to be called and see your new code.

An example of using a draggable list to visually reorder records.
Lianja OrderedLists –



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.