drop down data window

drop down data window

Post by Jim Burrough » Sat, 20 Jan 1996 04:00:00



how do you set the text(chosen) to be the first item in your datawindow for a drop
down datawindow?  In other words, when a window initially opens, the test line of
the DDDW is blank.  How can I populate it with the first row of my DW portion?  Any
help will be appreciated.  Thanks
 
 
 

drop down data window

Post by Terje Brasethv » Tue, 23 Jan 1996 04:00:00



Quote:> how do you set the text(chosen) to be the first item in your datawindow
for a drop
> down datawindow?  In other words, when a window initially opens, the
test line of
> the DDDW is blank.  How can I populate it with the first row of my DW

portion?  

It shouldnt be, it should automatically select the first row, if you
retrieve() the host datawindow the dw is placed within.

If however there is something in your code that leaves the first row
empty, there is an 'ugly' (in the sence that it looks ugly on the screen,
because the focus rectangle and the contens of the dddw flops around while
doing it) way to explicit select a row and make it active:

1)

Get the item you want and set it as the current row

DatawindowChild dwc

hostdw.GetChild("colname",dwc)
item = dwc.GetItemString(row,"colname") // Picks out the item, row = 1 in your
                                            case
dwc.SetRow(row) // sets the row to be active, this should be unneccesary
since you want he first row, and the  first row should be active after
retrieve()

Now that the row is set to active, is not the same as that its item
appears in the dddw field, so you have to :

hostdw.SetColumn("Colname") // Tell the dw which column you are to place text in
hostdw.SetText(Item)        // Place the text in the column

Note that you have to make sure that the row also is chosen to be active,
in addition to put the text in the textline. Since there is no explicit
connection when you do things this way, you could fool the user if there
is difference between the current row and the textline.

Hope it helps

brase

--

Terje Brasethvik
Norwegian Institute of Technology
Trondheim
NORWAY

 
 
 

1. HELP!!!!!How To Make Drop Down Data Window Selection NULL

I have a field that is a drop down data window.  When the window initially
comes up there is no selection and the field is null(There is no entry in the
DB table for the NULL record).  I would like to put a button on the window that
allows me to reset the field back to the state it was when the window came up
(i.e. no selection visable and field is blank).

Does any one have any ideas on how this can be done ?
--
Buddy Mcalister, Sr. Consultant Engineer
Arthur D. Little, Inc
5300 International Blvd N. Charleston, S.C. 29419

2. DB2/2 connection problems

3. Drop Down Data Window partial retrieve?

4. IBM AS400 E-Series, Signon Display

5. Drop Down Data Window Arrows

6. ntdomain in fqdn

7. Help - Can't get Drop Down Data Window (DDDW) to work w/Sybase

8. 1st Level AB3D (sob)

9. Drop down data windows

10. Multi-column drop down data windows

11. drop down data windows

12. Drop Down Data Window Edit Style Help

13. Updating Drop Down Data Windows ?