Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid
Message
From
07/02/1999 13:40:05
 
 
To
07/02/1999 13:32:20
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Grid
Miscellaneous
Thread ID:
00184821
Message ID:
00184879
Views:
21
>Again, i am going to highlight the whole row while click on the cell, is there any way to hightlight the specific number of column e.g. column 2-4

You can use the column's dynamic backcolor property to do this. For this, you need a custom grid property that keeps track of the current row, so the column.DynamicBackcolor property will have something to compare with when highlighting the row.

Here is some code from my grid class:

Grid.AfterRowColChange
LPARAMETERS nColIndex
THIS.CurRow = RECNO(THIS.RecordSource)
THIS.Refresh()

where CurRow is the custom grid property I spoke of above.

Then, for any columns that you want highlighted when the user is on its row, set the column.DynamicBackColor property to somehing like:

IIF(this.CurRow = RECNO(THIS.recordsource), 255, 16777215)

htis will make that column turn red in the current row. If you want the entire row to turn red, put something like the following in the grid.init:

THIS.SetAll("DynamicBackColor","IIF(this.currow = RECNO(this.recordsource), 255, 16777215)","Column")

THIS.SetAll("BackColor", 255,"textbox")


I hope this helps.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform