I have a delphi cxGrid I am using for grid entry to a SQL database. The grid pulls data from a view, so I have had to find a workaround for updating the data in the grid--my solution was to create a secondary column that is not linked to a field, and then use the ongetdisplay text event to populate the field and an onvalidate event to update the record to the new value.
The problem I'm finding however, is that once the value of the unlinked column is changed, the display
value reverts to the value of its twin column; I want it to use the actual column's value ONLY to populate the field initially, afterwards I want it to hold the value that is input. I've tried this:
if AText = '' then AText := VarToStr(ARecord.Values[gvFinishFormNEWCabinets_Masking_PercentComplete.Index]);
to no avail, the event seems to run anyways (I'm guessing that during edit it blanks the field at some point). Is there another way around this or maybe a better event to be using?