Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Is there a way to hide datagrid columns

Is there a way to hide datagrid columns

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nImStucked
    wrote on last edited by
    #1

    I created a table with 4 column. ProductID is one of them but I don't want to show this column. I set the DataSource of a DataGrid to this TABLE. However, vb.net doesn't like it when I use mygrid.Columns("ProductID").Visible Is there a way to hide this column? Any comment would be much appreciated.

    nImStucked

    B N 2 Replies Last reply
    0
    • N nImStucked

      I created a table with 4 column. ProductID is one of them but I don't want to show this column. I set the DataSource of a DataGrid to this TABLE. However, vb.net doesn't like it when I use mygrid.Columns("ProductID").Visible Is there a way to hide this column? Any comment would be much appreciated.

      nImStucked

      B Offline
      B Offline
      BrazenSix
      wrote on last edited by
      #2

      I used this set of FAQs to help me tinker with my datagrid, so it might help you out: http://www.syncfusion.com/FAQ/WindowsForms/FAQ\_c44c.aspx

      1 Reply Last reply
      0
      • N nImStucked

        I created a table with 4 column. ProductID is one of them but I don't want to show this column. I set the DataSource of a DataGrid to this TABLE. However, vb.net doesn't like it when I use mygrid.Columns("ProductID").Visible Is there a way to hide this column? Any comment would be much appreciated.

        nImStucked

        N Offline
        N Offline
        Nouvand
        wrote on last edited by
        #3

        Just replace the string with index of column.. YourGrid.Columns(0).Visible = False :suss:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups