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.comICQ #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.