The third one that I think is just the remaining space. You will need to sort the remaining columns. See This Post: Adjust ListView Columns According to WinForms
Key-2 in the last column:
[c#] private void Form1_Load(object sender, System.EventArgs e) { SizeLastColumn(lvSample); } private void listView1_Resize(object sender, System.EventArgs e) { SizeLastColumn((ListView) sender); } private void SizeLastColumn(ListView lv) { lv.Columns[lv.Columns.Count - 1].Width = -2; }
[c#] private void Form1_Load(object sender, System.EventArgs e) { SizeLastColumn(lvSample); } private void listView1_Resize(object sender, System.EventArgs e) { SizeLastColumn((ListView) sender); } private void SizeLastColumn(ListView lv) { lv.Columns[lv.Columns.Count - 1].Width = -2; }
source share