Hello,
I have a listview with two columns (the main listviewitem and one subitem), configured as a Detail View.
I have AutoFitColumns = ResizeallColumns.
The listview is anchored to a resizable form.
When I resize the form I want the first column (the MainColumn) to keep a constant widht. The second column should resize to take all the space available due to resizing.
Is there a way to get such behavior?
Thanks
If you set the MainColumn's width explicitly, it will stay that way (provided there is enough space) unless some other columns; width is set explicitly. I was able to get the behavior you described here using the following code:
this.ultraListView1.ViewSettingsDetails.AutoFitColumns = AutoFitColumns.ResizeAllColumns;this.ultraListView1.MainColumn.AllowSizing = DefaultableBoolean.False;this.ultraListView1.MainColumn.Width = 150;
Thanks for your answer Brian.
I configured a listview with those settings and I didn't get the desired behavior. I'm using version 2008 vol 2. Maybe it works fine on 2008 vol 3?
I'm attaching a test project. If you run it and resize the form the main column doesn't keep a fixed width.