Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: "SetAll" for Click on a Grid's component
Thread ID: 365611 Message ID: 365630 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Friday, December 28, 2012 8:00:31 PM         
   


While creating my codes half an hour ago I happened to have an error that said something along the line "event/method cannot contain nested procedure" ... that may have something to do with your error? -not sure -, still reading your codes - but then that's why my codes are structured the way it is now.

David
..
.


..
> > Hope this is what you mean, (Note in my default VFP folder I have a dbf called "browser.dbf":
> >
> > IF NOT USED('brw')
> >   USE browser IN 0 ALIAS brw
> > ENDIF 
> > SELECT brw
> > nF=FCOUNT()
> > FormX=NEWOBJECT("Form")
> > FormX.top=0
> > FormX.left=0
> > FormX.height=320
> > FormX.width = 400
> > FormX.AddObject("grid1","grid") 
> > WITH FormX.grid1
> >    .top= 10
> >    .left = 5
> >    .height = formx.height - 20
> >    .width = formx.width - 10
> >    .visible = .t.
> >    .columncount = nf
> >    .recordsource = 'brw'
> > ENDWITH
> >  
> > PUBLIC oHandler
> > oHandler=NEWOBJECT("myhandler")
> > LOCAL n
> > FOR n=1 TO nf
> > 	cn=ALLTRIM(STR(n))
> > 	BINDEVENT(formx.grid1.column&cn..header1,"click",oHandler,"mymessage")
> > ENDFOR     
> > formx.show(1)
> > 
> > DEFINE CLASS myhandler AS Session
> >     PROCEDURE mymessage
> >     	=MESSAGEBOX("Change this whole line to what you want this procedure to do")
> > ENDDEFINE
> > 

> >
> > David
> > ..
> > .
>
> Here's what I've tried:
>
>
** In the FORM.Init event
> FOR EACH oCol IN THIS.grdCursor.Columns
>    BINDEVENT(oCol.Header1, "Click", THIS, "SetGridOrder")
> NEXT m.I
> 
> ** In the FORM.SetGridOrder event
> LPARAMETERS oHeader
> 
> WAIT WINDOW [oHeader.Parent.ControlSource = "]+oHeader.Parent.ControlSource+["]

> What I get when I click on that header is "OHEADER is not an object" error message...
> IOW, I need to pass a parameter to this call - and can't imagine how (so far...)
>
> Regards,
>
> Ilya

ENTIRE THREAD

"SetAll" for Click on a Grid's component Posted by Ilya Rabyy @ 12/28/2012 4:52:02 PM
RE: "SetAll" for Click on a Grid's component Posted by Koen Piller @ 12/28/2012 6:24:59 PM
RE: "SetAll" for Click on a Grid's component Posted by Ilya Rabyy @ 12/28/2012 6:34:36 PM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/28/2012 7:29:23 PM
RE: "SetAll" for Click on a Grid's component Posted by Ilya Rabyy @ 12/28/2012 7:37:06 PM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/28/2012 7:51:06 PM
RE: "SetAll" for Click on a Grid's component Posted by Ilya Rabyy @ 12/28/2012 8:18:54 PM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/28/2012 8:27:51 PM
RE: "SetAll" for Click on a Grid's component Posted by Ilya Rabyy @ 12/28/2012 8:46:01 PM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/30/2012 2:15:11 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/28/2012 8:00:31 PM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/28/2012 10:08:56 PM
RE: "SetAll" for Click on a Grid's component Posted by Ilya Rabyy @ 12/28/2012 10:39:58 PM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/28/2012 11:21:00 PM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/29/2012 12:15:55 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/29/2012 4:30:20 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/29/2012 4:41:23 AM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/29/2012 5:18:36 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/30/2012 2:21:33 AM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/30/2012 2:40:52 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/30/2012 3:00:46 AM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/30/2012 3:09:49 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/30/2012 3:19:19 AM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/30/2012 4:52:53 AM
RE: "SetAll" for Click on a Grid's component Posted by Samir H. @ 12/30/2012 7:09:16 AM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/30/2012 2:33:42 PM
RE: "SetAll" for Click on a Grid's component Posted by Rick Hodgin @ 12/28/2012 6:53:02 PM
RE: "SetAll" for Click on a Grid's component Posted by Samir H. @ 12/29/2012 7:51:58 AM
RE: "SetAll" for Click on a Grid's component Posted by David Mustakim @ 12/29/2012 11:27:36 AM
RE: "SetAll" for Click on a Grid's component Posted by Anders Altberg @ 12/30/2012 3:08:19 PM