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
Printable View
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
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