Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternate color columns in a Grid?
Message
From
05/11/2004 16:19:05
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Alternate color columns in a Grid?
Miscellaneous
Thread ID:
00958685
Message ID:
00958685
Views:
73
I am using these commands to color the current row and alternate the color in 1 column of a data grid:

with thisform.grid1
.nRecNo=recno('pdfs') .setall('dynamicbackcolor','iif(recno(this.recordsource)=this.nRecNO,rgb(192,192,192),rgb(255,255,255))','column')
.column4.dynamicbackcolor='iif(mod(thisform.grid1.activerow,2)=1,rgb(255,255,0),rgb(255,128,192))'
.SetFocus()
endwith

The reason I am using Thisform.grid1.activerow to set the dynamicbackcolor rather than the .nRecNo property is that this data is not in recno order and cannot easily be made to be in recno order.

All works well until the user clicks to do a page down on the scroll bar. Column4 then becomes 1 color and stays so until the user either clicks on the grid or does a key event to move the record pointer in the grid.

I have put the .column4.dynamicbackcolor line of code in the grids scrolled event, but no joy.

Any suggestions?
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Next
Reply
Map
View

Click here to load this message in the networking platform