Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Sandy Stephen
  Where is Sandy Stephen?
 Pune
 India
 Sandy Stephen
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: FLEXGRID
Thread ID: 249264 Message ID: 249296 # Views: 4 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Thursday, December 31, 2009 2:39:41 PM         
   


> >
> > ok, but which portion of the code will allow user to enter data in second column .....
> >
> > Sandy
>
> Have you tries to run the code?
> The KeyPress Event of the FlexGrid (if the ColSel property is 0 return, means the user is on column1 so we do not do anything, otherwise let the user type something)
>
>
PROCEDURE olecontrol1.KeyPress
>  		*** ActiveX Control Event ***
>  		Lparameters keyascii
>                 if .ColSel = 0
>                    return
>                 endif 
>  		With This
>  			Do Case
>  			Case keyascii=8 &&IF KEY IS BACKSPACE THEN
>  				If .Text <> ""
>  					 .Text =	Left(.Text, (Len(.Text) - 1))
>  				Endif
>  			Otherwise
>  				.Text = alltrim(.Text) + Chr(keyascii)
>  			Endcase
>  		Endwith
>  	ENDPROC

>
>
> Mike Gagnon
> Refox XI +(English version)

Thanks a lot, sorry to interrupt more than one ....
Thanks again...
Happy new year

Sandy

ENTIRE THREAD

FLEXGRID Posted by Sandy Stephen @ 12/31/2009 7:44:16 AM
RE: FLEXGRID Posted by Mike Gagnon @ 12/31/2009 1:30:04 PM
RE: FLEXGRID Posted by Sandy Stephen @ 12/31/2009 1:45:19 PM
RE: FLEXGRID Posted by Mike Gagnon @ 12/31/2009 1:55:13 PM
RE: FLEXGRID Posted by Sandy Stephen @ 12/31/2009 1:59:46 PM
RE: FLEXGRID Posted by Mike Gagnon @ 12/31/2009 2:10:56 PM
RE: FLEXGRID Posted by Sandy Stephen @ 12/31/2009 2:21:36 PM
RE: FLEXGRID Posted by Mike Gagnon @ 12/31/2009 2:27:33 PM
RE: FLEXGRID Posted by Sandy Stephen @ 12/31/2009 2:39:41 PM
RE: FLEXGRID Posted by Anders Altberg @ 1/1/2010 2:41:49 PM