Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display combo with no selection
Message
From
28/06/2005 09:22:40
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01026750
Message ID:
01026993
Views:
21
>>Nope I can't. My combo and listboxes (if not all almost all of them) already have rowsourcetype 3-SQL and I always use Listindex=0 successfully.
>>Maybe you could provide a reproducing code?
>>Cetin
>
>Are you sure you have several items with empty value and not empty DisplayValue? I'll try to create a repro. I bound the combobox to Business object cEmployeeID property. Could it be a problem?
>
>Here is my current code:
>
>.cboEmployees.rowsourcetype = 3
>		.cboEmployees.rowsource = ;
>			"SELECT distinct cEmpName, cUserID " + ;
>			"FROM " + m.tcEmployeeAlias + ;
>			" INTO CURSOR c_AllEmployees " + ;
>			"ORDER BY 1"
>		.cboEmployees.controlsource = .oBizObj.cUserID
>		
>		if not empty(.oBizObj.cEmployeeID)
>			.cboEmployees.value = .oBizObj.cEmployeeID
>		else
>			.cboEmployees.value = .null. && we want to start with no selection
>	*		.cboEmployees.ListIndex = 0
>		endif
I see a controlsource setting there (cannot comment further oBizObj is a blackbox for me).
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
Next
Reply
Map
View

Click here to load this message in the networking platform