|I did try using ColumnHeader.Caption with same results, so I decided to use some other string (DateTime.Now.ToString() in this case) to see if it had anything to do with using ColumnHeader text as source. The problem is not the Text, I get the correct Text when I use ColumnHeader[x].ToString(), just the width of the columns are Zero unless i set the width to a positive value. Obviously this is not criticle, but I'd like to have the columns sized to their header, and now its kinda a mission to figure out why it doesn't work.
The following are the settings for the list view:
this.lvResults.AllowColumnReorder = true;
this.lvResults.ContextMenu = this.cmResults;
this.lvResults.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvResults.FullRowSelect = true;
this.lvResults.GridLines = true;
this.lvResults.Location = new System.Drawing.Point(0, 0);
this.lvResults.MultiSelect = false;
this.lvResults.Name = "lvResults";
this.lvResults.Size = new System.Drawing.Size(536, 342);
this.lvResults.TabIndex = 0;
this.lvResults.View = System.Windows.Forms.View.Details;
this.lvResults.SelectedIndexChanged += new System.EventHandler(this.lvResults_SelectedIndexChanged);
And the HeaderStyle is set to Clickable.....