I have followed the instruction in the article linked to below and and some partial success. If I had a TcxDBLookupComboBox somewhere on my form it works as I want it to. But the column in the grid isn't doing the same thing when set to use a lookup combo on the column properties. My replacement code is slightly different to the example :[Delphi]
procedure TcxDBLookupComboBoxAccess.PrepareDisplayValue(const AEditValue: TcxEditValue; var DisplayValue: TcxEditValue; AEditFocused: Boolean); begin inherited; if EditValue = -1 then DisplayValue := '** ' + Self.DataBinding.DataSource.DataSet.FieldByName('EmployeeName').AsString; end;
I have also checked the above to see if it gets hit when the grid displays but nothing happens - it only fires for the lookup combo elsewhere on the form.
A common approach to conditionally modify a certain cell's text is to handle the column's OnGetDisplayText event. Please check if this event can help you accomplish your task.
If it does not help, provide us with a small example demonstrating the problematic behavior. We will try to find an appropriate solution for you.