Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Marc Lyon
  Where is Marc Lyon?
 Niagara Falls
 New York - United States
 Marc Lyon
 To: dcNiko Vujke
  Where is dcNiko Vujke?
 Belgrade
 Serbia
 dcNiko Vujke
 Tags
Subject: RE: Text display of grid column
Thread ID: 289199 Message ID: 289210 # Views: 64 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Wednesday, December 29, 2010 2:10:57 PM         
   


> Hi fox(f)i(gh)ters,
> one more question from me.
>
> If value of table column contain characters 'A', 'I' etc.
> can they be displayed as 'Active','Inactive' etc.
> Can this be done without of changing table contents?
> If can, how to set this column values?
>
> Regards,
> Nikola.


Nikola,

You can put an expression in a grid column, if you type it into the properties box you have start it with an equal sign...

Lets call your field cStatus.

Grid.Column.ControlSource = "ICASE(cStatus=[A], [Active], cStatus=[I], [Inactive], cStatus=[R], [Ready], [WTF])"

This will allow the grid to display the Text in place of the cStatus field.
However, the control will be read only.

Hope this helps.

Marc

ENTIRE THREAD

Text display of grid column Posted by dcNiko Vujke @ 12/29/2010 10:21:22 AM
RE: Text display of grid column Posted by Samir H. @ 12/29/2010 1:36:56 PM
RE: Text display of grid column Posted by Marc Lyon @ 12/29/2010 2:10:57 PM
RE: Text display of grid column Posted by dcNiko Vujke @ 12/29/2010 5:18:01 PM
RE: Text display of grid column Posted by dcNiko Vujke @ 12/31/2010 2:04:21 PM
RE: Text display of grid column Posted by Mustapha Bihmouten @ 12/31/2010 2:28:55 PM
RE: Text display of grid column Posted by Samir H. @ 12/31/2010 4:21:50 PM
RE: Text display of grid column Posted by dcNiko Vujke @ 1/4/2011 10:33:18 AM
RE: Text display of grid column Posted by Rahul Moudgill @ 1/4/2011 11:01:21 AM