Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid highlighter question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00778717
Message ID:
00778804
Vues:
11
>Hi,
>I am using the grid highlighter for my application,
>version 3.8.2. Is there a newer updated version,
>where do I get it from ?
>
>I had this issue, I tied my grid to one of my
>dbf file, if I click on any of the grid row, I
>want to increase and decreaes that row qty field,
>tie to the dbf file
>
>However, sometimes, the highlighted row is not in
>synchronize with my dbf record. After updating the
>qty, the highlighted row might jump another row.
>How can I ensure that the lighlighted row on my grid
>is the record that I selected and I going to update
>without jump to another row.
>Any method in the class that allow me to do so. Please
>advise. Thank you

GHL 3.8.2 is the current version.

Can you send me a sample form (and all related files)?

I've seen similar focus jumping before and it is a grid issue, often happening when you perform calculations and update the values in the column textbox. Grid.Refresh() call may help there. The place where you call it depends on what and where you are doing in your calculations. Highlighting just follows the focus jump.

For example in my message Re: Unbound Textbox in grid Thread #746878 Message #746902 I show the sample of calculations in the grid:
**************************************************
*-- Form:         form1 (c:\z\form311.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   01/29/03 06:01:10 PM
*
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT grid1 AS grid WITH ;
		ColumnCount = 2, ;
		Height = 200, ;
		Left = 24, ;
		RecordSource = "table2", ;
		Top = 24, ;
		Width = 320, ;
		Name = "Grid1", ;
		Column1.ControlSource = "table2.wtkgs", ;
		Column1.Name = "Column1", ;
		Column2.Bound = .F., ;
		Column2.ControlSource = "", ;
		Column2.Sparse = .F., ;
		Column2.DynamicCurrentControl = "thisform.calcpounds()", ;
		Column2.Name = "Column2"


	ADD OBJECT form1.grid1.column1.header1 AS header WITH ;
		Caption = "Kg", ;
		Name = "Header1"


	ADD OBJECT form1.grid1.column1.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	ADD OBJECT form1.grid1.column2.header1 AS header WITH ;
		Caption = "Pound", ;
		Name = "Header1"


	ADD OBJECT form1.grid1.column2.text1 AS textbox WITH ;
		BorderStyle = 0, ;
		Margin = 0, ;
		ForeColor = RGB(0,0,0), ;
		BackColor = RGB(255,255,255), ;
		Name = "Text1"


	PROCEDURE calcpounds
		lparameter tn
		thisform.grid1.column2.Text1.Value = wtkgs*2.205
		return tn 
	ENDPROC


	PROCEDURE text1.Valid
		replace wtkgs with this.value/2.205
	ENDPROC


	PROCEDURE text1.GotFocus
		this.parent.parent.refresh()
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
the code piece in the grid definition:
	PROCEDURE text1.GotFocus
		this.parent.parent.refresh()
	ENDPROC
is there to prevent the focus jumping.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform