public static void ShowReadOnlyListViewForm(IList columns, IList items, Control parentControl) { if (items.Count > 0) { ListViewForm popup = new ListViewForm(); ListViewPopupController popupController = new ListViewPopupController(popup, columns, items); popupController.LoadView(); DialogResult dialogResult = popup.ShowDialog(parentControl); popup.Dispose(); } else { MessageBox.Show("No records found."); } }
public void SetController(ListViewPopupController controller) { this.controller = controller; }