CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    6

    [B]Hide Datagrid column[/B]

    I have two datagrids in my form. The second datagrid data displayed depends on the row selection made in the first datagrid. Using the id displayed in the first datagrid I retrieve the data for the second datagrid. So it is important that I have the id in the first datagrid. But I want to hide this.
    I tried using this code
    dgRegion.Columns(0).visible = False
    but I get a message
    "columns is not a member of system.windows.forms.datagrid".

    I am not able to create an object of type datagrid either.

    I read somewhere that to use the columns.visible property I have to create the datagrid through the code. Is this true?
    Will I not be able to hide the column for a datagrid generated in the designer?

    Thanks.

  2. #2
    Join Date
    Jul 2002
    Location
    India
    Posts
    505

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

Featured