public void ReloadTableView(NSTableView tableView, List<string> datasource) { tableView.Delegate = new TableDelegate (); var listView = new DefaultDataSource { Entries = datasource }; tableView.DataSource = listView; tableView.ReloadData (); }
public void ReloadCertificates() { foreach(NSTableColumn column in CertificateChainTableView.TableColumns()) { CertificateChainTableView.RemoveColumn (column); } CertificateChainTableView.Delegate = new TableDelegate (); var listView = new DefaultDataSource { Entries = _certs }; var columnNames = new List<ColumnOptions> { new ColumnOptions{ Id = "Name", DisplayName = "Certificate", DisplayOrder = 1, Width = 400 } }; var columns = ListViewHelper.ToNSTableColumns (columnNames); foreach (var column in columns) { CertificateChainTableView.AddColumn (column); } CertificateChainTableView.DataSource = listView; CertificateChainTableView.ReloadData (); }