Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Tariq Mehmood
  Where is Tariq Mehmood?
 BAHAWALPUR
 Pakistan
 Tariq Mehmood
 Tags
Subject: RE: Numeric Format in Grid
Thread ID: 311216 Message ID: 311273 # Views: 37 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Thursday, June 30, 2011 6:16:12 AM         
   


> >
> >
> >
> > thisform.Grid1.Column3.DynamicInputMask = ;
> >   [IIF((closing.open_qty%1)>0,] + ;
> >   ['@Z 9,999.'+REPLICATE('9',LEN(LTRIM(RTRIM(STR((closing.open_qty%1),8,3),0,'0')))-2),'@Z 9,999')]
> > 

> >
> >
> > Regards,
> > Onytoo
>
>
> Sir, If I use this
>
>
> with thisform.Grid1.Column3
> .DynamicInputMask = ;
>   [IIF((.controlsource%1)>0,] + ;
>   ['@Z 9,999.'+REPLICATE('9',LEN(LTRIM(RTRIM(STR((.controlsource%1),8,3),0,'0')))-2),'@Z 9,999')]
> endwith
> 

>
> Then it says:
>
> Expression is invalid. Use a valid expression for INPUTMASK property.
>
> I changed column name with controlsource.

Hello Tariq,

Try this:

With Thisform.grid1.column3
	x = .ControlSource
	.DynamicInputMask = ;
		[IIF((&x %1)>0,] + ;
		['@Z 9,999.'+REPLICATE('9',LEN(LTRIM(RTRIM(STR((&x %1),8,3),0,'0')))-2),'@Z 9,999')]
Endwith




http://sandstorm36.blogspot.com/
http://weblogs.foxite.com/sandstorm36/default.aspx
http://www.coderisland.com/forum/viewforum.php?f=10

ENTIRE THREAD

Numeric Format in Grid Posted by Tariq mehmood @ 6/29/2011 7:02:12 PM
RE: Numeric Format in Grid Posted by Borislav Borissov @ 6/29/2011 7:13:37 PM
RE: Numeric Format in Grid Posted by onytoo @ 6/29/2011 8:11:30 PM
RE: Numeric Format in Grid Posted by Tariq mehmood @ 6/29/2011 9:01:43 PM
RE: Numeric Format in Grid Posted by onytoo @ 6/29/2011 9:30:04 PM
RE: Numeric Format in Grid Posted by Tariq mehmood @ 6/30/2011 5:36:49 AM
RE: Numeric Format in Grid Posted by Jun Tangunan @ 6/30/2011 6:16:12 AM
RE: Numeric Format in Grid Posted by Tariq mehmood @ 6/30/2011 6:19:23 AM
RE: Numeric Format in Grid Posted by Jun Tangunan @ 6/30/2011 6:28:36 AM
RE: Numeric Format in Grid Posted by Manoj Patel @ 6/30/2011 7:49:14 AM
RE: Numeric Format in Grid Posted by onytoo @ 6/30/2011 8:26:33 AM
RE: Numeric Format in Grid Posted by Tariq mehmood @ 6/30/2011 1:56:25 PM
RE: Numeric Format in Grid Posted by onytoo @ 6/30/2011 5:01:06 PM
RE: Numeric Format in Grid Posted by Tariq mehmood @ 6/30/2011 7:36:17 PM
RE: Numeric Format in Grid Posted by onytoo @ 6/30/2011 11:38:27 PM