comart
April 3rd, 2001, 11:57 AM
Hierarchical FlexGrid
How can I programmatically make a column invisible, change width of columns, etc.?
How can I programmatically make a column invisible, change width of columns, etc.?
|
Click to See Complete Forum and Search --> : Hierarchical FlexGrid comart April 3rd, 2001, 11:57 AM Hierarchical FlexGrid How can I programmatically make a column invisible, change width of columns, etc.? John G Duffy April 3rd, 2001, 07:01 PM ' MSFlexGrid1.ColWidth(1) = 0 John G comart April 4th, 2001, 07:03 AM 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. Johnny101 April 4th, 2001, 04:04 PM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |