Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change DBGrid display Text

Status
Not open for further replies.

clemsonzhe

Programmer
Jan 5, 2005
7
US
help!!! I'm trying to change the data being displayed in a DBGrid cell to another language; but i would like to keep the data set (the query that DBGrid is attached to) intact (with all the data still in english).
Is there any way to do this? I tried dbgrid.fields.text := 'blah', but it wouldn't change becuase the data set isn't in edit mode (from this, it looks like Delphi makes you change the query data as well); but if I try IBQuery.edit, it complains that it "cannot Update"
thanks in advance..
 
I'd suggest approaching this a different way....

You can keep the DBGrid, but you need an extra (calculated) field to use as a scratch pad for your translated language.

The new field is then displayed dynamically, depending on the language you use. With this approach you can use an on scroll event or similar to perform the calculation.

Another approach would be to display your data in a string grid, loading it from the IBquery - it keeps your original data intact. However, it requires more work to set it up....

Chris ;-)
 
Thanks for the idea!
my problem is that I must do this for a "dynamic query" (aka, no fields in field editor, they get filled at run time); and I cannot abandon our custom-made DBGrid to use a string grid...
any other suggestions?
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top