public ColumnSettings(DataGridViewColumnCollection columns) { SettingList = new List<ColumnSetting>(columns.Count); foreach (DataGridViewColumn c in columns) { ColumnSetting cs = new ColumnSetting(); cs.DisplayIndex = c.DisplayIndex; cs.Name = c.Name; cs.Width = c.Width; cs.Visible = c.Visible; SettingList.Add(cs); } }
public ColumnSettings(DataGridViewColumnCollection columns) { SettingList = new List <ColumnSetting>(columns.Count); foreach (DataGridViewColumn c in columns) { ColumnSetting cs = new ColumnSetting(); cs.DisplayIndex = c.DisplayIndex; cs.Name = c.Name; cs.Width = c.Width; cs.Visible = c.Visible; SettingList.Add(cs); } }