PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
Combo-box Table populating a Combo-box List
Published by jOHN
in the category Finance
New features
Description
You can automatically populate a Combo-box List based upon a Combo-box Table selection.
Using the RAD and code with 3 data files as follows;

File "A" contains apartment buildings, File "B" has units in an apartment building, File "C" has the people applying for a specific apartment in a building.

Using the RAD form for the person's RENTAL APPLICATION you'll need to selection the building shown to the Applicant using a Combo-box table established under CONTENT to show buildings names & addresses. In the Code section "END OF INITIALIZATION" for this form I've used "PROPERTIES" for the combo-box controls;

"This sets the list to the first selection. It is in the 'END OF INITIALIZATION' to only do this once, so if the user clicks on or back-tabs to the control the selection is not automatically changed to the start again."

// all buildings and units loaded into memory, now select first one's and display
ListDisplay(Applied_for_Building,taStart)

"For the same reason stated earlier and in addition this control establishes a filter to only list those units that have the same building key and it sorts the list in ascending order and points to the first one in the list. The same code below is also in the 'ROW SELECTION OF' code so if the user clicks on or back-tabs, the control repeats the same update on the Combo-box List."

// display only units for selected building in ascending order
COMBO_Building_Unit_#..Filter = COMBO_Building_key
COMBO_Building_Unit_#..SortOption = ccRespectNumeric
ListDisplay(COMBO_Building_Unit_#,taStart)

So if you use the up/down arrow keys or pull-down the list in the form and select different buildings the unit list changes automatically.

Learn more about 'Property' controls using .. to perform data handling.
Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
No review or comment? Be the first one!
ABOUT
RATING:
3.26315789473719(19)
DOWNLOADS:
848
PUBLISHED:
July 14, 2009
VERSION:
CONCERNS:
WINDEV
Minimum version: 01A140029v
SIZE:
347 B