The code sample changes the cell color for positive and negative currency amounts and works well.
However the currency formatting is lost, dollar signs and thousands separators are getting stripped off.
What is an elegant way to stop or fix this behavior?
procedure TCostsf.wwDBGrid1DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
with (Sender as TwwDBGrid), ClientDataSetCosts do begin
if (Field.Value < 0) then
Canvas.Brush.Color := 8421631
Canvas.Brush.Color := 8454016;
Canvas.TextRect( rect, rect.left, rect.Top + 2, FieldByName( Field.FieldName).AsString);