Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox not working in grid with XP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01318122
Message ID:
01321440
Views:
47
I fixed it myself by adding a method called on page refresh to disable the controls while the grid stays enabled. Everything works great.
LPARAMETERS plStatus

WITH ThisForm.p_grid
    FOR i = 1 TO .ColumnCount
    	oCol = .Columns[i]
	FOR x =  1 TO oCol.ControlCount
	    oCtrl = oCol.Controls[x]
	    IF INLIST(oCtrl.BaseClass,"Textbox","Combobox")
	        oCtrl.enabled=plStatus
	    ENDIF && INLIST(oCtrl.BaseClass,"Textbox","Combobox")
	ENDFOR 
    ENDFOR
ENDWITH
>I know how to add and configure a combobox in a grid. The white paper was a good refresher though. I was still having problems with the combobox not dropping down until I had a problem with another app. The permissions for the same data folder had been changed to read. I changed it back to modify and my combobox's work like they should. I had not messages of "access Denied" or anything, weird. Everytime I clicked on a combobox, the machine mad a clunk sound, who knew that meant the data was not accessable. Win2k gave me the error, but XP acted weird.
>
>All is good except for one thing, I disable(readonly) the grid until a user clicks the Edit button. I cannot get the combobox to NOT dropdown or NOT change values. All other columns (textboxes) maintain readonly status.
>Is there a way to disable the combobox until user request to Edit it and still have it show the correct data?
>
>Thanks, Chuck
>
>
>>The link "How to Put a Combo Box in a Grid", opens a zip file of tables and forms, no documents.
>>
>>I just downloaded the zip file from the web site and checked it and there is indeed a white paper in the zip called ComboInGrid.doc.
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Reply
Map
View

Click here to load this message in the networking platform