Good afternoon.
I know how to create the listbox but i am having some problems to fill a multicolumn listbox.
How can i do it?
Thank you.
Good afternoon.
I know how to create the listbox but i am having some problems to fill a multicolumn listbox.
How can i do it?
Thank you.
What kind of list control do you use? My first-hand choice for a multicolumn list is typically the ListView, that you can populate like so:
foreach (var item in someDataList)
{
// create the list view item (which makes the first column)
ListViewItem lvi = myListView.Items.Add(item.Text);
// add additional columns
lvi.SubItems.Add(item.SomeOtherValue);
}
Then you set the View
property to Details
and edit the Columns
collection and needed. and you should be good to go.