Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying Text on Grids
Message
From
30/08/2001 05:17:59
 
 
To
29/08/2001 17:33:46
John Tomblin
Service Station Systems, Inc.
San Jose, California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00550594
Message ID:
00550733
Views:
20
Hi!

Make grid column read-only, then set the expression for trunslating code into the meaningful text in a ControlSource of the column. Access fields using Alias.Name. For example:

Grid.Column2.ReadObnly=.T.
Grid.Column2.ControlSource="GenNameByCode(MyTable.MyNameCodeField)"

Why you need the code value inside of the textbox? Texbox is used by grid to display values and could contain only the value of ControlSource. When you have code that works with data in grid, you require to work using the grid alais and direct reference to the data in that alias. It is problematic to use grid controls for that.

HTH.

>The RecordSource for a grid is a table. The Table contains severl fields that hold codes which don't have meaning to the end user. I have functions that translate these codes into understandable text. Those grid columns that would display the decoded informations are read only. Other columns need to be editable.
>
>I have tried putting the decodeing function as the ControlSource and putting code in the refresh for the grid's TextBox, neither work. I'm sure others do this on grids but I'm having no luck.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform