Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSFlexGrid Question

Status
Not open for further replies.

cindyray

Programmer
Jun 12, 2001
24
US
Is there any way to "stripe" the msflexgrid or the mshflexgrid? I tried doing a loop like this

x = 1
do until rs.eof
load the grid
if x mod 2 = 0 then
mshflexgrid.backcolorband(x) = vbyellow
endif
x = x + 1
rs.movenext
loop

I tried reading the help, but that didn't help much.
Is what I'm trying to do even possible with the grids that come with Visual Studio?
 
I believe the answer is yes, but. You are on the right track, but instead of using the backcolorband property, try selecting the row and then using the backcolorsel property.

I have found that many things are possible to do with the flexgrids hence their name. The caveat is that the way to do it does not always seem to be the most elegant, if ya know what I mean. There have been times when the brute force method seemed to be the only option.

Let me know if this works.


ttfn
dan Dan Grogan
dan@siqual.com

"Absit prudentia nil rei publicae profitur."
Without common sense you ain't gonna have nothing.
 
I'm not really sure how to do every other row, but you can change the color with

MSHFlexGrid1.CellBackColor = vbRed

When you get it figured out, you should post it. I have seen that question asked before many times.

Hope it does you some good. Rob
Just my $.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top