-----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;
Title: 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
- [DUG]: TwwDBGrid John Christenhusz
- Re: [DUG]: TwwDBGrid Rohit Gupta
- Re: [DUG]: TwwDBGrid Rohit Gupta
- [DUG]: TwwdbGrid John Christenhusz
- Re: [DUG]: TwwdbGrid Nello Sestini
- RE: [DUG]: TwwdbGrid James Sugrue
- RE: [DUG]: TwwdbGrid John Christenhusz
- RE: [DUG]: TwwdbGrid James Sugrue