private void FillListView() { lvwFields.Items.Clear(); lvwFields.ListViewItemSorter = null; lvwFields.BeginUpdate(); foreach (object o in _fields) { try { DataFieldColumn d = (DataFieldColumn)o; string colname = d.ColumnName + ((d.PrimaryKey)?"-[PK]":"") + ((d.VerifiedField)?"-[VERIFIED]":"") + ((d.Excluded)?"-[EXCLUDED]":""); ListViewItem lvi = lvwFields.Items.Add(colname); lvi.SubItems.Add(d.FieldSetupString()); lvi.SubItems.Add(d.FieldDataTypeString()); lvi.SubItems.Add(d.FieldLabel); lvi.SubItems.Add(d.TabIndex.ToString()); lvi.Tag = d; } catch (Exception e) { string s = e.Message; string st = e.StackTrace; } } lvwFields.EndUpdate(); //sort Sort(); }
private void FillListView() { lvwColumns.Items.Clear(); lvwColumns.BeginUpdate(); foreach (object o in _dataFieldColumns) { DataFieldColumn d = (DataFieldColumn)o; string colname = d.ColumnName + ((d.PrimaryKey)?"-[PK]":"") + ((d.VerifiedField)?"-[VERIFIED]":""); ListViewItem lvi = lvwColumns.Items.Add(colname); lvi.SubItems.Add(d.FieldSetupString()); lvi.SubItems.Add(d.FieldDataTypeString()); lvi.SubItems.Add(d.TableColumnOrder.ToString()); lvi.Tag = d; } lvwColumns.EndUpdate(); }