Title: Message
IP3000 (which is worth the upgrade BTW) has it too. The new Delphi procedure is OnDrawColumnCell which IP doesn't appear to implement.
-----Original Message-----
From: John Christenhusz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 August 2001 11:20
To: Multiple recipients of list delphi
Subject: RE: [DUG]: TwwdbGrid

Thanks James for the code, this works great!
 
As you wrote, using the OnDrawDataCell Event is apparently obsolete! What's the alternative?
 
TIA
John
-----Original Message-----

I think the problem is (I could be wrong here) that by changing then Field.Text you are actually attempting to change the underlying datasets field data, which is, by the looks of it, a float or currency field.

From what I can tell you want to put a '+' sign in the Price Column if it matches the criteria.

Try this work around, using the OnDrawDataCell Event (which is apparently obsolete but my version of IP doesn't have the OnDrawColumnCell)

Procedure TformREDB.dbGridSearchDrawDataCell(Sender : Tobject; const Rect : Trect; Field : Tfield; State : TGridDrawState); 
Const

   PlusSign = '+';
Begin
   if (field.name = 'tblClientPrice') and (tblClientType.asInteger = 2) then
      wwwdbGridSearch.Canvas.TextOut(Rect.Left + 5,  Rect.Top + 1, PlusSign); 
End;

Reply via email to