Results 1 to 4 of 4

Thread: Hiding DBGrid columns

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    11
    How do you hide a DBGrid column? I tried DBGrid.Column(0).Visible = False but it didn't work, dunno why?

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    easiest way is ususally to set it's width to 0

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    11

    Unhappy ...

    Yes, I tried that, also. No error, it just seemed to ignore it. In Debug mode, everything evaluates as they should, the properties I mean.

  4. #4
    New Member
    Join Date
    Jul 2000
    Posts
    9

    Answer

    Bit of an amature at this VB stuff but heres how I hid a column using DBGrid:



    Dim Col1, Col2 as Column
    Set Col1 = DBGrid1.Columns(0)
    Set Col2 = DBGrid1.Columns(1)
    Col1.Caption = "Invisible"
    Col2.Caption = "Column 2"
    Col1.Visible = False



    Hope it helps you

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