Link to home
Start Free TrialLog in
Avatar of luciliacoelho
luciliacoelhoFlag for Portugal

asked on

how can i put a diferente colour in a grid line

how can I put different colors in the lines of a visual foxpro grid so as to highlight certain items.
thanks
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

You may use DynamicForeColor and DynamicBackColor of the Column. To highlite each the second line you may use following code:

THIS.setall("Dynamicbackcolor", "IIF(RECNO()%2=0,RGB(255,255,0),RGB(192,192,192))","Column")

in Grid.Init method code.
Avatar of luciliacoelho

ASKER

thanks very much, for the topics. What i want is to change the color of the line numer p.e. 100.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can also use ICASE() instead of IF() for more choices
ICASE(logical1,color1,logical2,color2,...,colorn)

Or you can call a function that returns a color.
CategoryColor(query.category)