title: Delphi TDBGrid edit inplace with drop down list
body: <p>I have to do maintenance to an old Delphi v7 application which uses a TDBGrid allowing inplace editting with drop down lists.</p>
  
  <p>The issue is: the grid will show only the values present at data source. Without editting, this would be no problem at all. But if I change some value, the grid will only show the newly set value after updating the underlying register (until that the "old" value is displayed).</p>
  
  <p>This only applies to drop down lists. Other input types (checkboxes, text edits) work without problems.</p>
  
  <p>The edit itself also works fine: the changed values are actually reflected in the datasource when the register is UPDATE'd. My only problem is displaying this not-yet-UPDATE'd value.</p>
  
  <p>I have no idea how to even debug this, or further inspect this behavior. So even if you don't have a complete answer, please indicate what else can I do to find a solution.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The project originally used TDB3DGrid (whose source I'm not aware of), but to simplify things I've changed it to TDBGrid. To no avail. The only change was that true/false columns are now displayed as text, and edited as text boxes (displaying and accepting "True" and "False" strings); with TDB3DGrid it showed checkboxes.</p>
  
  <p>Other columns (not edited trough drop down list) are fine: after editing the new value is displayed correctly even before updating the underlying register.</p>
  
  <p>I'm still tracking down where does the list of alternatives that fill the drop down list comes from.</p>
  
  <p>Also still trying to come with an MCVE.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>Apparently the (now) TDBGrid's affected TDBGridColumn has an empty <code>PickList</code> property. Sure for designtime. But I think this is not changed in runtime.</p>
  
  <p>TDBGrid's source is a child of a TQuery, whose affected field has <code>FieldKind</code> equal to <code>fkLookup</code>. Other properties set for the field are <code>FieldName</code>, <code>KeyFields</code>, <code>LookupDataSet</code>, <code>LookupKeyFields</code> and <code>LookupResultField</code>.</p>