Results 1 to 5 of 5

Thread: removing/hiding columns in msflexgrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    9

    removing/hiding columns in msflexgrid

    Hi to everyone.

    I want to know how to remove/hide columns in msflexgrid. I'm going to do this for printing the control but not all the columns are included. Can someone help me with this? Thank you in advance.

  2. #2
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: removing/hiding columns in msflexgrid

    Have you try this ? this "hide" the columns but still there (just not visible)

    Flex1.ColWidth(3) = 0

    3 is the Number of the Column

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    9

    Re: removing/hiding columns in msflexgrid

    No, I haven't. Thank you for this.

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: removing/hiding columns in msflexgrid

    The FlexGrid does not have an internal method to delete a column but its easy to do using this simple procedure.

    VB Code:
    1. Public Sub DeleteColumn(FlexGrid As MSFlexGrid, ByVal Column As Long)
    2.     With FlexGrid
    3.         'move the column to delete to the end
    4.         .ColPosition(Column) = .Cols - 1
    5.         .Cols = .Cols - 1 'change the number of columns
    6.     End With
    7. End Sub

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    9

    Re: removing/hiding columns in msflexgrid

    brucevde,

    Thank you for your help. I'm now ok with this. :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width