RE: Setting Background row color in a grid.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Frank:

Take a look at these articles. I think they give you what you need.

132549 How to Set the Color and Font of Grid Rows Conditionally
http://support.microsoft.com/default.aspx?scid=kb;EN-US;132549
130458 How To Highlight the Entire Row in Grid When User Clicks
http://support.microsoft.com/default.aspx?scid=kb;EN-US;130458
126839 How To Create Special Effects in a Grid
http://support.microsoft.com/default.aspx?scid=kb;EN-US;126839

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/

*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003


A second problem I have is that I want to set the background color of a
row
in a grid if that row has a certain value in a cell. If the cell is not
empty
then I want the row to grey. I would like for this to happen as the grid
is
loaded. I am not sure where to put the code to do this.

Here is the code I want to use:

IF LEN(ALLTRIM(ThisForm._GRID1.Column4.Text1.Value)) > 0 then
ThisForm._GRID1.Column4.BackColor = RGB(255,255,128)
endif

This actually only greys out 1 cell but I have tried to put this code in
several places and all I can get done is to grey out the entire column -
even
when I don't want certain cells greyed out.

TIA

Frank
-----------------------------------

.



Relevant Pages

  • Statistics for alt.machines.cnc, 02 Oct 2006
    ... This automated posting occurs weekly on Monday. ... Summary of articles spanning a 7 day period. ... Total posts considered: 523 over 7 days ... Total number of posters: 104, average 12,435 bytes per poster ...
    (alt.machines.cnc)
  • Re: Laff, call your therapist
    ... or 2) posting either actual passages ... >>> or links to articles in French. ... If you bother to look at my posting here at rbr back to 1994 regarding drugs ...
    (rec.bicycles.racing)
  • Re: Mixing authentication modes on ISA Server 2K
    ... > Jim Harrison [ISASE] ... > Read the help, books and articles! ... > This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.isaserver)
  • Statistics for alt.machines.cnc, 03 Dec 2007
    ... This automated posting occurs weekly on Monday. ... Summary of articles spanning a 7 day period. ... Total posts considered: 1,193 over 7 days ... Total number of posters: 687, average 5,050 bytes per poster ...
    (alt.machines.cnc)
  • Re: Humanism
    ... trend and have tried posting newspaper articles. ... Any new posts get swallowed up by the next 20 Lance articles. ... manage to be the top poster to the newsgroup despite Lance's onslaught. ... The newsgroup no longer represents humanism. ...
    (uk.philosophy.humanism)