Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 Tags
Subject: RE: Valid method and grid text1 of column1
Thread ID: 104434 Message ID: 104469 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Wednesday, August 16, 2006 8:52:07 PM         
   


is exact on
> > I have to check that if the valid value is present then lose focus from that column of the grid
> >
> > For this i am checking in the Text1 valid event of Column1 by this way
> >
> > IF THIS.Value = [M] OR THIS.Value = [ ]
> > RETURN .T.
> > ELSE
> > WAIT WINDOW "Only letter [M] is allowed in M/P column" NOWA
> > RETURN THIS && Option 1
> > ENDIF
> >
> > IF THIS.Value = [M] OR THIS.Value = [ ]
> > RETURN .T.
> > ELSE
> > WAIT WINDOW "Only letter [M] is allowed in M/P column" NOWA
> > NODEFAULT && Option 2
> > ENDIF
> >
> > In both ways it is jumping to next column or to next record

>
> Khurram,
>
> You need to return a numeric or a logical from the .Valid() - try this:
>
> IF THIS.Value = [M] OR THIS.Value = [ ]
>    RETURN .T.
> ELSE
>    WAIT WINDOW "Only letter [M] is allowed in M/P column" NOWAIT
>    RETURN .F.  
> ENDIF 
> *****   or
> IF THIS.Value = [M] OR THIS.Value = [ ]
>    RETURN 1
> ELSE
>    WAIT WINDOW "Only letter [M] is allowed in M/P column" NOWAIT
>    RETURN 0
> ENDIF 
> 

>
>
> Ken
>
> You shall know the truth - and the truth shall set you free. (John 8:33)


ENTIRE THREAD

Valid method and grid text1 of column1 Posted by Khurram Tahir @ 8/16/2006 2:13:47 PM
RE: Valid method and grid text1 of column1 Posted by Ken Murphy @ 8/16/2006 2:55:03 PM
RE: Valid method and grid text1 of column1 Posted by tushar @ 8/16/2006 8:52:07 PM