Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 To: roro roro
  Where is roro roro?
 
 Canada
 roro roro
 Tags
Subject: RE: grid
Thread ID: 104456 Message ID: 104574 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Grids
Date: Thursday, August 17, 2006 7:39:40 PM         
   


I don't see anything in the code below that would cause the grid to stop allowing you to select something. Is there code elsewhere in the grid? One thing you might try is commenting out all the code in one method at a time to see at what point the grid stops working. Once you pin it down to a specific method, it's easier to figure out what line of code is causing the problem.

> > > hi,
> > > i'm working on two forms and when i click on the grid of form1 the txtxbox of form2 changes i put my code in AfterRowColChange. The problem is each time i click on the grid, it stops working normally(no more able to select or to use the splitbar) and if i click any where outside the form1 and then again on the form1 it works normally. plz need help
> > >
> > > thx

> >
> > What is the code you have in the AfterRowColChange method? When you post your code, please surround it with code block tags, which you can do by selecting the code and clicking the fourth button from the left on the toolbar above the edit window.
> >
> > -BP
> > www.peisch.com

>
>
LPARAMETERS nColIndex
> FOR i = _screen.formCount TO 1 STEP -1
>   IF INLIST(_screen.from[m.i].caption, 'Kodak','Toyota','GFS')
>       obj = _screen.from[m.i]
>       EXIT
>    ENDIF
> ENDFOR
> 
> IF _screen.formCount > 2
>    IF thisform.Name='Offers' AND INLIST(UPPER(SUBSTR(DBC	(),4,3)),'KOD','TOY','GFS')
> 	DO case
> 	  CASE UPPER(SUBSTR(DBC(),4,3)) = 'KOD'
> 	    obj.caption = 'Kodak'
> 	    obj.txtnumber.visible = .t.
> 	    obj.txttypef.visible = .t.
> 	    obj.txtFrancais.visible = .t.
> 	    obj.txtAnglais.visible = .t.
> 	    obj.txtPoints.visible = .f.
> 	    obj.txtColumnId.visible = .f.
> 	    obj._label5.visible = .t.
> 	    obj._label6.visible = .t.
> 	    obj._label7.visible = .t.
> 	    obj._label8.visible = .t.
> 	    obj._label10.visible = .f.
> 	    obj._label9.visible = .f.
> 	    obj.txtid.value= Evaluate(this.column1.ControlSource)
> 	    obj.txttype.value= Evaluate(this.column8.ControlSource)
> 	    obj.txtvalue.value= Evaluate(this.column9.ControlSource)
> 	    obj.txtno.value= Evaluate(this.column4.ControlSource)
> 
> 	    IF !USED('CliOffers')
> 	      USE R:\Kodak\PropDb\offers.dbf SHARED IN 0 ALIAS CliOffers
> 	    ENDIF
> 
> 	    IF SEEK(obj.txtid.value, 'CliOffers', 'offerid')
> 		obj.txtnumber.value= CliOffers.coffernumber
> 		obj.txttypef.value= CliOffers.ctypefrench
> 		obj.txtFrancais.value= CliOffers.cfrench
> 		obj.txtAnglais.value= CliOffers.cenglish
> 	    ELSE
> 		obj.txtnumber.value= ''
> 		obj.txttypef.value= ''
> 		obj.txtFrancais.value= ''
> 		obj.txtAnglais.value= ''
> 	    ENDIF
> 				
> 	   CASE UPPER(SUBSTR(DBC(),4,3)) = 'TOY'
> 		obj.caption = 'Toyota'
> 		obj.txtnumber.visible = .f.
> 		obj.txttypef.visible = .f.
> 		obj.txtFrancais.visible = .t.
> 		obj.txtAnglais.visible = .f.
> 		obj.txtPoints.visible = .f.
> 		obj.txtColumnId.visible = .t.
> 		obj._label5.visible = .f.
> 		obj._label6.visible = .f.
> 		obj._label7.visible = .t.
> 		obj._label8.visible = .f.
> 		obj._label10.visible = .f.
> 		obj._label9.visible = .t.
> 				
> 		obj.txtno.value= Evaluate(this.column4.ControlSource)
> 				
> 		IF !USED('CliOffers2')
> 	USE R:\toyota\PropDb\offerheader.dbf SHARED IN 0 ALIAS CliOffers2
> 		ENDIF
> 
> 		IF SEEK(obj.txtno.value, 'CliOffers2', 'offerno')
> 			obj.txtColumnId.value= CliOffers2.cReportColumnId
> 			obj.txtFrancais.value= CliOffers2.cOfferDesc
> 		ELSE
> 			obj.txtFrancais.value= ''
> 			obj.txtColumnId.value= ''
> 		ENDIF
> 			
> 		CASE UPPER(SUBSTR(DBC(),4,3)) = 'GFS'
> 			obj.caption = 'GFS'
> 			obj.txtnumber.visible = .f.
> 			obj.txttypef.visible = .f.
> 			obj.txtFrancais.visible = .f.
> 			obj.txtAnglais.visible = .f.
> 			obj.txtPoints.visible = .t.
> 			obj.txtColumnId.visible = .f.
> 			obj._label5.visible = .f.
> 			obj._label6.visible = .f.
> 			obj._label7.visible = .f.
> 			obj._label8.visible = .f.
> 			obj._label10.visible = .t.
> 			obj._label9.visible = .f.
> 				
> 		obj.txtno.value= Evaluate(this.column4.ControlSource)
> 			
> 		IF !USED('CliOffers3')
> 		USE R:\GFS\PropDb\offers.dbf SHARED IN 0 ALIAS CliOffers3
> 		ENDIF
> 
> 		IF SEEK(obj.txtNo.value, 'CliOffers3', 'offerno')
> 			obj.txtPoints.value= CliOffers3.npoints
> 		ELSE
> 			obj.txtPoints.value= ''
> 		ENDIF
> 
> 	   ENDCASE
> 	ENDIF
> endif
> this.Refresh 

>
> thx




-BP
www.peisch.com

ENTIRE THREAD

grid Posted by roro roro @ 8/16/2006 5:50:07 PM
RE: grid Posted by Barbara Peisch @ 8/16/2006 7:58:21 PM
RE: grid Posted by roro roro @ 8/16/2006 8:18:02 PM
RE: grid Posted by Barbara Peisch @ 8/17/2006 7:39:40 PM