Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with the valid of a checkbox in a grid
Message
De
17/04/2008 15:23:45
Chris Sund
Silhouette Solutions
Utah, États-Unis
 
 
À
17/04/2008 05:59:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01311365
Message ID:
01311569
Vues:
17
Hi Cetin,

I have one additional question. I've never used the 4-SQL Statement as the RecordSourceType. What do I define as the controlsource for my columns? Here's how I modified your example to fit my needs.
* Init of Grid2

DODEFAULT()


* Get County List

Create Cursor rcounties ;
			(ccounty_pk c (23),;
			lchoice l,;
			cname c (25),;
			cstate c (2))
			
			SELECT * FROM rcounties ORDER BY lchoice INTO CURSOR rcounties READWRITE 


SELECT * FROM data\counties WHERE ccounty_pk in(SELECT ccounty_fk FROM data\stxproperty) INTO CURSOR tinsert_county

SCAN
SCATTER NAME ocounty
INSERT INTO rcounties(ccounty_pk,lchoice,cname,cstate) values(ocounty.ccounty_pk,.t.,ocounty.cname,ocounty.cstate)
endscan






this.RecordSourceType = 4
text to this.RecordSource noshow pretext 15
select * from rcounties
 where cstate in
 (select cstate_pk from rstates where lchoice)
 into cursor rcounties2
ENDTEXT
Here's Grid 1
* InteractiveChange event of column1.Grid1 

DODEFAULT()

this.Value = this.Value
WITH thisform.pageframe1.page2.grid2
 .RecordSource = .Recordsource
 .SetFocus()
ENDWITH
this.SetFocus()
Everything works beautifully but I need to point the columns of Grid2 to the proper data info in my SQL statement. I tried setting them to rcounties2.lchoice,rcounties2.cstate, rcounties2.cname, but it didn't work. I'm sure there's a different way to do this when using a RecordSourceType of 4. I've been looking for some info on the controlsource, but I haven't found anything yet. If I do I will reply back to this thread.

Many Thanks!

Chris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform