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.
Printable View
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.
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
No, I haven't. Thank you for this.
The FlexGrid does not have an internal method to delete a column but its easy to do using this simple procedure.
VB Code:
Public Sub DeleteColumn(FlexGrid As MSFlexGrid, ByVal Column As Long) With FlexGrid 'move the column to delete to the end .ColPosition(Column) = .Cols - 1 .Cols = .Cols - 1 'change the number of columns End With End Sub
brucevde,
Thank you for your help. I'm now ok with this. :-)