private void GenericDetailedListSearchWithColumnFormats_Click(object sender, EventArgs e) { var dates = GetWorldWarOneDates(); var search = new GenericDetailedListSearchDialog<KeyDateInWwi>(); search.SetValues( "Select an item", dates, new[] { "Date", "Theatre", "Description" }, i => new[] { i.Date.ToString("dd/MM/yyyy"), i.Theatre, i.Description }, new[] { ListViewItemTextComparer.ColumnFormat.Date, ListViewItemTextComparer.ColumnFormat.Text, ListViewItemTextComparer.ColumnFormat.Text }); search.Sort(); search.FixWidth(); MessageBox.Show(search.ShowDialog() != DialogResult.OK ? "Cancelled" : string.Format("Selected {0}", search.SelectedItem.Date)); }