Click to See Complete Forum and Search --> : Alternate Colored Rows in FlexGrid
Rev. Michael L. Burns
Mar 12th, 2000, 11:53 PM
I've heard that you can use alternate row colors in a VB FlexGrid. I need to have the even rows one color and the odd orws another like Greenbar computer paper. How can this be done?
Rev. Michael L. Burns
Bigley
Mar 13th, 2000, 01:17 AM
The only way I know to do this would be to use 2 For loops and run down through the grid changing the backcolor of each cell on each row.....I have used this successfully and it is reasonable fast.
If you set up 2 loops and use the optional keyword 'Step' you can run down through the even rows
For i = 2 to grddata.rows Step 2
:
:
And then run down through the odd rows
For i = 1 to grddata.rows Step 2
Just looking at that there you might want to be careful that it doesn't step over a last row into oblivion and give you an error but I'm sure you can get a way around that
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.