Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox with ROWS from different Fields.. Its Possible?
Message
From
01/05/1998 05:55:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/04/1998 16:15:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00096112
Message ID:
00096224
Views:
12
>*** It's possible in a Combobox, when the list open, have something like this:
>(This is from same Table but diferent Fields)
> SALES IN NEW YORK
> Jhon
> Smith
> Mc Claud
> SALES IN TEXAS
> Mc Gree
> Mendez
>
> or with two columns:
>
> SALES IN NEW YORK
> Jhon
> Smith
> Mc Claud
> SALES IN TEXAS
> Mc Gree
> Mendez
Hi Chris,
I think two column approach is better (and not to leave Sales in lines blank for salesperson). Another good approach for this could be a treeview control.
* Two columns approach could directly use org table
* but repeating lines would be annoying
select region, salesperson, recno() as rcno ;
  from  myTable ;
  where .t. ;
  order by 1 ;
  into cursor tcOrdered
use dbf("tcOrdered") in 0 again alias tcComboSource
use in "tcOrdered"
select tcComboSource
go top
m.region = ""
scan
   if !(region == m.region)
      m.region = region
   else
      replace region with ""
   endif
endscan
with thisform.mycombo
 .rowsourcetype = 1 - Fields
 .rowsource = tcCombosource.region,salesperson,rcno
 .boundcolumn = 3
 .columnwidths = 100,100,0
endwith
For treeview approach a sample form is mailed to you.
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