Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can we get grid's combo's values reliably?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Can we get grid's combo's values reliably?
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01537064
Message ID:
01537064
Vues:
84
Hi everybody,

I have a grid on the form. It has several comboboxes. I want to pass the descriptions into another form. What I found happening is that the values from the wrong row (the last one) are passed when the cursor is on the first row.

Here is the code I'm trying
local lcLevel, lcSection
if not empty(nvl(rsTSBlocks.BlockID,0))
	
	oAppObj.ViewParameter = transform(rsTSBlocks.BlockID)
	lcLevel = this.parent.grdSeatBlocks.colLevels.cboLevels.displayvalue
	lcSection = this.parent.grdSeatBlocks.colSections.cboSections.displayvalue
	do form EditBlockDetails with thisform, m.lcLevel, m.lcSection, ;
		rsTSBlocks.row, rsTSBlocks.BlockID
else
	=messagebox('You need to save this Block first!',48, 'New Block')
endif
I've tried many different ideas and I can not make it to work so far. How can I reliably pick up the values of the combo's display values for the corresponding row in the grid?

Thanks in advance.

UPDATE. Never mind, I solved it by selecting this info from the main cursor, e.g.
local lcLevel, lcSection
local array laInfo[1,2]
if not empty(nvl(rsTSBlocks.BlockID,0))

	oAppObj.ViewParameter = transform(rsTSBlocks.BlockID)
	select descrip, SectionDescrip from csrLevelsSections ;
		where LevelID = rsTSBlocks.LevelID and SectionID = rsTSBlocks.SectionID ;
		into array laInfo

	lcLevel = laInfo[1,1]
	lcSection = laInfo[1,2]  &&this.parent.grdSeatBlocks.colSections.cboSections.displayvalue
	do form EditBlockDetails with thisform, m.lcLevel, m.lcSection, ;
		rsTSBlocks.row, rsTSBlocks.BlockID
else
	=messagebox('You need to save this Block first!',48, 'New Block')
endif
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform