Mar 19th, 2006, 01:30 PM
#1
Thread Starter
Frenzied Member
Highlight Columns in Flexgrid[RESOLVED]
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
Last edited by sacramento; Mar 19th, 2006 at 03:00 PM .
Mar 19th, 2006, 02:06 PM
#2
Re: Highlight Columns in Flexgrid
That isn't possible using the built in selection functionality.
However, you can do it yourself:
Attached Files
Last edited by bushmobile; Apr 24th, 2006 at 11:09 AM .
Mar 19th, 2006, 02:37 PM
#3
Thread Starter
Frenzied Member
Re: Highlight Columns in Flexgrid
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?
Mar 19th, 2006, 02:43 PM
#4
Re: Highlight Columns in Flexgrid
Do you mean you want to scroll to a row that isn't currently in view? If so then set the .TopRow value:
Mar 19th, 2006, 02:50 PM
#5
Thread Starter
Frenzied Member
Re: Highlight Columns in Flexgrid
Mar 19th, 2006, 02:57 PM
#6
Re: Highlight Columns in Flexgrid
Don't forget to mark this thread resolved if you consider it be so
Mar 19th, 2006, 08:46 PM
#7
Re: Highlight Columns in Flexgrid[RESOLVED]
I've neatened up the code in post #2, if you're interested.
Mar 19th, 2006, 10:03 PM
#8
Re: Highlight Columns in Flexgrid
Originally Posted by
bushmobile
Do you mean you want to scroll to a row that isn't currently in view? If so then set the .TopRow value:
Just make sure Redraw property is set to True before using TopRow or it wouldn't work otherwise - that's how control is designed.
Apr 24th, 2006, 09:28 AM
#9
Fanatic Member
Re: Highlight Columns in Flexgrid[RESOLVED]
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
Apr 24th, 2006, 11:10 AM
#10
Re: Highlight Columns in Flexgrid[RESOLVED]
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.
Apr 24th, 2006, 11:32 AM
#11
Fanatic Member
Re: Highlight Columns in Flexgrid[RESOLVED]
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!
Apr 24th, 2006, 11:33 AM
#12
Re: Highlight Columns in Flexgrid[RESOLVED]
Well apparently it's not a bug (but it sure is annoying!): http://www.vbforums.com/showthread.php?t=401236
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width