Colorising Grid based on a condition

From: Ian Robinson (ian_at_forest2000.co.uk)
Date: 10/30/03


Date: Thu, 30 Oct 2003 21:04:39 +0000

Hi,

I'm trying to display the text of certain rows according to a condition
in the DrawColumnCell event of a grid as follows...

if tblOrders.FieldByName('Date ordered').isnull = false then
   dbgOrders.Canvas.Font.color := clRed;
dbgOrders.DefaultDrawColumnCell(Rect,DataCol,Column,State);

This colourises the text as I want but the grid does not behave as it
did previously. It persists in going to the first of last record display
rather than the current record of the dataset

Any ideas ?

-- 
Best regards
Ian Robinson    FOREST SOFTWARE
                         +44(0)1594 564457 (Office)
                         +44(0)7718 806 006 (UK Mobile)
                         +34 653 209 592 (Overseas Mobile)
                         +44(0)1594 564038 (Out of hours support)


Relevant Pages

  • Re: Optimizing for speed
    ... > Simple query which returns ... I'd like to inmediately display records and allow user ... >> I'd consider is how much data am I loading in the grid vs. what the user ... >> in others where this isn't the bottleneck the differences aren't worth ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Label will not display NEW records frm another (bound) form.
    ... The GRID form was written in Visual Basic. ... that person’s name in a label control of a second unbound form. ... Its purpose is to display the results ... past Registrations. ...
    (microsoft.public.access.formscoding)
  • Graphics - need to draw to the screen and then erase it
    ... and then use lines to create a grid. ... I then draw sine-waves ontop of the ... So the user presses on the display with the stylus and a line is ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Label will not display NEW records frm another (bound) form.
    ... The GRID form was written in Visual Basic. ... that person’s name in a label control of a second unbound form. ... Its purpose is to display the results ... past Registrations. ...
    (microsoft.public.access.formscoding)
  • Re: Optimizing for speed
    ... The query itself is fast, it's actually the loop that reads all the records ... I'd like to inmediately display records and allow user ... > I'd consider is how much data am I loading in the grid vs. what the user ... > in others where this isn't the bottleneck the differences aren't worth ...
    (microsoft.public.dotnet.framework.compactframework)