General information
Category:
Forms & Form designer
Hi Robin.
>>If your record order within a grid control is not in record number order is there anyway of alternating the background colour of each line in the grid? <<
Not easily. The only thing that I can think of (off the top of my head) would be to bind the grid to an updateable cursor or local view with an extra field called nRecOrder or something like that. After the cursor or view was populated and in the desired order, you'd have to initialize a counter to 0, scan it, increment the counter inside the loop, and replace nRecOrder with its value. Then, you could issue this command:
Thisform.MyGrid.SetAll("DynamicBackColor", "IIF(MOD(nRecOrder, 2)=0, RGB(255,255,255), RGB(0,255,255))", "Column")
Very clunky and definitely not a good idea for large tables, but it could work.
Marcia
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only