Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two grids on the form and SetFocus problem
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Two grids on the form and SetFocus problem
Divers
Thread ID:
00552492
Message ID:
00552492
Vues:
52
Hi everybody,

I have two grids on the form + 2 grid Highlighters by Nick Nekloidov. First grid is based on BldMstr table and displayes Status, Lender Code, Lender Name, Old Lender Code, Old Lender Name. The second grid is based on LenderView and displayes lenders from Lookup Lender table based on the first letter in Lender Name field of the BldMstr table. In other words, when I navigate from record to record I requery() the view, if the first letter changes. I also perform a "soft" seek based on the 4 first letters of Lender Name. It works fine.
However, I added a possibility to edit Lender Name directly on the BldMstr grid. Here is my code in InteractiveChange event of Lender Name textbox:
********************************************************************
*  Description.......: Lender Name.InteractiveChange
*  Calling Samples...: 
*  Parameter List....: 
*  Created by........:  
*  Modified by.......: Nadya Nosonovsky 09/05/2001 09:59:46 AM
********************************************************************
if this.tag<>this.value && Was changed
	local lcOldValue
	select BldMstr
	if !empty(OldValue)
		lcOldValue=BldMstr.OldValue
	else
		lcOldValue=BldMstr.Lender + '|' + this.tag
	endif
	if thisform.ProcType = 'Trxnmstr'		&& Trans Master Lender maintenance
		replace RevLend with 'E', ;
			Matched with 'E', ;
			OldValue with m.lcOldValue in BldMstr
	else									&& Weekly Transaction Processing
		replace RevLend with 'E', ;
			OldValue with m.lcOldValue in BldMstr
	endif
	thisform.KeyValue=left(this.value,1)
	lcLetter=thisform.KeyValue
	requery('LenderView')
	=seek(left(this.value,4),'LenderView')
	thisform.grdLender.refresh()
*	thisform.grdLender.SetFocus()
*!*		this.SetFocus()
endif
dodefault()
As you can see, I commented out two last lines, because it causes "reverse" typing, e.g. the user tries to quickly type "first", but it shows like "tsrif".

So, my question is: is it possible to highlight the record in grdLender, but have ability to work with grdBldMstr? It's not critical and my manager and user accepted, that the record on the second grid is highlighted only after he/she leaves this column, but it would be nice to have this record highlighted at the same type, he/she types.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform