Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox clears after selection.
Message
From
20/07/1999 09:30:58
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
20/07/1999 09:18:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00243502
Message ID:
00243549
Views:
21
>Cetin,
>
>BoundTo is .T. (tried it with .F. too)
>Valid is a user procedure that goes somthing like this:
> SELECT extras (this is the grid table)
> REPLACE extras.Labor WITH This.text
> SELECT laborate
> LOCATE FOR laborate.labor = extras.labor
> IF FOUND()
> REPLACE extras.lab_price WITH laborate.retail, ;
> extras.lab_cost WITH laborate.wholesale
> ELSE
> MessageBox("Sorry - not found.")
> ENDIF
>
>A lot of detail is left out of this example, but the main ideas are here. I also refresh the adjoining columns of the grid, for instance.
>
>Thanks!
>Tom.
Tom,
Combo is in grid itself, true ? Why select extras here ?
    select Extras
    REPLACE extras.Labor WITH This.text
* ???? Isn't labor the controlsource of column ?

    REPLACE extras.Labor WITH This.value
* Text is unformatted and might not be compatible
* ie: text = "heLLo" value = "Hello"
* If style is combo :
this.value = this.displayvalue
this.displayvalue = this.value
* is sometimes a lifesaver

    if seek(extras.labor,"laborate", "labor") && Tag on labor
      REPLACE extras.lab_price WITH laborate.retail, ;
        extras.lab_cost WITH laborate.wholesale
    ELSE
      MessageBox("Sorry - not found.")
    ENDIF
found() inside a grid is dangerous unless workarea alias is included.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform