Discussion:
How to Highlight Grid Rows based on criteria ?
(too old to reply)
July Dereck
2010-08-07 07:05:16 UTC
Permalink
Using Visual FoxPro 9 SP2

How do I get certain Rows of a Grid to be highlighted with a certain
color based on criteria in that table?

For Example if a field "TYPE" value is 0 to 10 that row should be
Green,
if the value is 11 to 20 that row should be Yellow....

What is the easiest way to do it?

Thanks in advance.
Dan Freeman
2010-08-07 14:49:05 UTC
Permalink
Post by July Dereck
Using Visual FoxPro 9 SP2
How do I get certain Rows of a Grid to be highlighted with a certain
color based on criteria in that table?
For Example if a field "TYPE" value is 0 to 10 that row should be
Green,
if the value is 11 to 20 that row should be Yellow....
What is the easiest way to do it?
Thanks in advance.
There is no Row object in the grid, so you'll have to set each column's
DynamicBackColor property to evaluate on the fly:

= YourLogic()

It could either call a UDF, or a method somewhere. Personally, I'd save
the grid as a class and add a method to the new class for this.

Dan
dayanand sagar
2010-08-29 07:03:55 UTC
Permalink
Sagar
Post by July Dereck
Using Visual FoxPro 9 SP2
How do I get certain Rows of a Grid to be highlighted with a certain
color based on criteria in that table?
For Example if a field "TYPE" value is 0 to 10 that row should be
Green,
if the value is 11 to 20 that row should be Yellow....
What is the easiest way to do it?
Thanks in advance.
There is no Row object in the grid, so you will have to set each column's
= YourLogic()
It could either call a UDF, or a method somewhere. Personally, I'd save
the grid as a class and add a method to the new class for this.
Dan
Submitted via EggHeadCafe - Software Developer Portal of Choice
ObjectDumper LINQ To Export Collection Via .NET Reflection
http://www.eggheadcafe.com/tutorials/aspnet/21737599-5a63-4672-a32c-a36cca282a3f/objectdumper-linq-to-export-collection-via-net-reflection.aspx
Continue reading on narkive:
Loading...