Hi:
This code Highlight my 8 column in a MSflexgrid:
VB Code:
MSFlexGrid1.Col = 8 MSFlexGrid1.SetFocus
But I want highlight too my 2,4 and 6 columns...
Who can I do this?
Thanks
Printable View
Hi:
This code Highlight my 8 column in a MSflexgrid:
VB Code:
MSFlexGrid1.Col = 8 MSFlexGrid1.SetFocus
But I want highlight too my 2,4 and 6 columns...
Who can I do this?
Thanks
That isn't possible using the built in selection functionality.
However, you can do it yourself:
ok...
Annother doubt in MSFlexgrid...
Wich way I can,trought code,scroll to the recordset I had highlight but I can not see him in the MSflexgrid?
Do you mean you want to scroll to a row that isn't currently in view? If so then set the .TopRow value:
VB Code:
MSFlexGrid1.TopRow = 5
yes...that's it...thanks
:thumb:
Don't forget to mark this thread resolved if you consider it be so
I've neatened up the code in post #2, if you're interested.
Just make sure Redraw property is set to True before using TopRow or it wouldn't work otherwise - that's how control is designed.Quote:
Originally Posted by bushmobile
Hi bushmobile,
Will this code only work with the MSHFlexGrid (note the H!) or can it work with the MSFlexGrid too? I've tried adding an MSFlexGrid to your sample project and it's not quite working properly, but there maybe properties that need altering...
Cheers,
Nick
Hmmm, thanks for pointing that out, I assumed I'd done it with an MSFlexGrid (I don't normally ever use MSH).
Yes it can be done. I've done a little messing around and there seems to be a bug in the MSFlexGrid that you have to work around. Code in post #2 updated.
Thanks so much! Yes, have to admit, I've found the flexgrid rather strange and wondered about a bug... thanks for updating it, much appreciated!
Well apparently it's not a bug (but it sure is annoying!): http://www.vbforums.com/showthread.php?t=401236