Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I change the column width of FlexGrid?

Status
Not open for further replies.

ii128

Programmer
May 18, 2001
129
US
I have a Hierarchical FlexGrid the layout as follow:


Company ID Company Name Department Employee Name
1 BB. Inc HR Lucy
Danny
IS Candy
Daicy
2 ABC. Inc HR Steve
Fanny
IS Nancy


Any one can help me That?

How can I change the column width of Department and Employee Name to 2000

I have tried that:

FlexGrid.ColWidth(2) = 5000
FlexGrid.ColWidth(3) = 5000

But It doesn't work. Anyone can help me correct them?
 
When you say it doesn't work, do you get any error messages, or does it just stay the standard width? The setting of the .colwidth property should work. If you step through the code, does the width change and then change back for some reason, or does it do nothing at all? Also, where in your code does the grid get filled, from where, and do you refresh the grid at any time?
 
also do ypu use a formatstring
eg FlexGrid.formatstring = "Company ID|Company Name|Department| Employee Name"

if so you must set the colwidth after the format string.
 
Hi, all replyer,

I have done everything, the column width did chaned but the words in the column did mix up. for example, the department HR, jumps to Employee Name column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top