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

    Hierarchical FlexGrid

    Hierarchical FlexGrid

    How can I programmatically make a column invisible, change width of columns, etc.?


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Hierarchical FlexGrid

    '

    MSFlexGrid1.ColWidth(1) = 0




    John G

  3. #3
    Join Date
    Aug 2000
    Posts
    265

    Re: Hierarchical FlexGrid

    I tried that yesterday, but couldn't get it to work. I am using the data environment as my data source. If I simply drag from the data environment to a form, my grouping column is displayed twice so I was trying to programmatically remove the extra column. I tried the colwidth(3) = 0, but then my data was wiped out. Do you have any code examples? I have searched MSDN help and Microsoft's site with no success.



  4. #4
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Hierarchical FlexGrid

    i had this problem before - the way i got around it, was moving the location of the grouping column in the "child" select to the end of the list, thereby making another column the "key" column to show the + in the grid, then making that column's width = 0.

    if your child select is like this:

    SELECT RelateID, Field1, Field2 FROM YourTable

    change it to:

    SELECT Field1, Field2, RelateID FROM YourTable

    the outcome is still the same, but now when you populate the grid - the column that has the expandlie + is Field1 - so you can hide the RelateID column and not loose that funcionality.

    it's sloppy, but it works. (at least for me

    hope this helps,

    john

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

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