Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need an advise in designing DataWindow

Status
Not open for further replies.

Negator

Programmer
Joined
Oct 4, 2003
Messages
33
Location
RU
Hello all PowerBuilder wizards!

I need an advise on designing dw. I'm just beginner, and these design tools are to huge to understand their abilities quick :-)

I have a table with columns ID and Value. Looks like this:

1 10.11
1 11.05
1 09.15
2 16.13
2 15.98
2 16.25

e.t.c.

My datawindow must have two elements:

1) DropDownList with ID's (no repeats). For this example - numbers 1 and 2.

2) A table with values for the ID chosen in DropDownList.


I'll be pleasant for each advise!
Thank you!!!
 
Right, lets assume that ur table is called negator
and has the following data
ID VALUE
------------
1 10.11
1 11.05
1 09.15
2 16.13
2 15.98

1. Create a new datawindow with the following SQL
SELECT distinct id FROM
negator ORDER BY id
Call this datawindow dddw_id

2. Create a new datawindow with the following SQL
SELECT id,value FROM
negator ORDER BY id,value

Now in the design view, right click and select properties of
the column "id".
Change the Edit Style from "Edit" to "DropdownDatawindow"
Select "dddw_id" as dropdown datawindow , Data column and Display column both - id
Select "Always show arrow"

There you go....rock on!!!

cheers
MM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top