We have a Members table containing a field (as integer) to define the "status of membership" by his id. By example: 0 for Inactive, 1 for Active, 2 for LifeTime, 3 for Retired, 4 for Exceptional Achievement, etc,
We have a StringGrid attach to the Members table with LiveBindings. So, in the grid we see the id number of the status (1 or 2 or Etc.). But we want to see the "Labels" of that status (ex: LifeTime) and not his id.
For information, the "status label" cannot be store in a Lookup table because it have to be translated in different language.
I've created an object containing the status ObjMemberStatus:TObjectList<TMemberStatus>;
that hold membership labels using a TAdapterBindSource.
I was able to assign this information to a ComboBox using a TDataGenerator. I think it's the way to do with ComboBox in that situation, and this is working very well for that.
My question is: how can I display the label contained in a AdapterBindSource to a column of a grid ?
I've perform some search and I did not see how to do that directly with LiveBindings. Maybe I've missied somethings.
I've also seen in the help that we can add that method: Lookup(scope lookup, key fields, key values, result fields) to the CustumFormat property. But no example show how to use that CustumFormat Method. I've search on the web for that and it seem to be undocumented.
Sub-Questions, there is a way to bypass or hook some code into the LiveBindings data assignation to component process ?