Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1960
Fixed MainColumn width on a resizable listview
posted

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

Parents
No Data
Reply
  • 69832
    Offline posted

    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;

Children