PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Highlight Columns in Flexgrid[RESOLVED]-VBForums
Results 1 to 12 of 12

Thread: Highlight Columns in Flexgrid[RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,294

    Resolved Highlight Columns in Flexgrid[RESOLVED]

    Hi:

    This code Highlight my 8 column in a MSflexgrid:
    VB Code:
    1. MSFlexGrid1.Col = 8
    2. 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.

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Highlight Columns in Flexgrid

    That isn't possible using the built in selection functionality.

    However, you can do it yourself:

    Attached Files Attached Files

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,294

    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?

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    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:

    VB Code:
    1. MSFlexGrid1.TopRow = 5

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,294

    Re: Highlight Columns in Flexgrid

    yes...that's it...thanks

  6. #6
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Highlight Columns in Flexgrid



    Don't forget to mark this thread resolved if you consider it be so

  7. #7
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Highlight Columns in Flexgrid[RESOLVED]

    I've neatened up the code in post #2, if you're interested.

  8. #8
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,135

    Re: Highlight Columns in Flexgrid

    Quote 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:

    VB Code:
    1. MSFlexGrid1.TopRow = 5
    Just make sure Redraw property is set to True before using TopRow or it wouldn't work otherwise - that's how control is designed.

  9. #9
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    545

    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
    Nick Cook
    VB6 (SP6)

  10. #10
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    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.

  11. #11
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    545

    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!
    Nick Cook
    VB6 (SP6)

  12. #12
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    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
  •  



Featured


Click Here to Expand Forum to Full Width