Compare two data in the DBGrid (entered one and the previous one) lazarus / 16-Databases ---------------------------------------------------------------------- IndianaJones · 2013-01-12 12:14 Hello all, I have encountered a little problem, which I have to compare two values and colorizing under the ondrawoncell. Here is the summary.            C1      R1       V1      R2       V2      In the diagram I will compare the V1 and V2 values if V2 value is less than V1 than colorizing the row which is V2. I hope I can express myself clearly. Thanks for the help. ---------------------------------------------------------------------- gato2707 · 2013-01-12 17:04 DBGrid is a representation of the data contained in a Dataset. Why you don't compare directly fields values instead compare cells values in the DBGrid? ---------------------------------------------------------------------- IndianaJones · 2013-01-14 13:47 How? Can you give any hint? ---------------------------------------------------------------------- teos · 2013-01-19 20:20 Ondrawcell or the event you use, has the new value where the dataset in which the old data is, has the previous value. Accessible as "dataset.fieldbyname". Or am I missing the clue?