dgvTimesInfo.ReadOnly = false; List<Ctrls.Grid.GridColumn> columns = new List<Ctrls.Grid.GridColumn>(); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"时段", Field = nameof(TimesInfo.TimeInterval), DataType = typeof(string), Visible = true, Width = 100 }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Monday)} 周一", Field = nameof(TimesInfo.Monday), DataType = typeof(bool), Visible = true, Width = 100,ReadOnly=false }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Tuesday)} 周二", Field = nameof(TimesInfo.Tuesday), DataType = typeof(bool), Visible = true, Width = 100, ReadOnly = false }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Wednesday)} 周三", Field = nameof(TimesInfo.Wednesday), DataType = typeof(bool), Visible = true, Width = 100, ReadOnly = false }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Thursday)} 周四", Field = nameof(TimesInfo.Thursday), DataType = typeof(bool), Visible = true, Width = 100, ReadOnly = false }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Friday)} 周五", Field = nameof(TimesInfo.Friday), DataType = typeof(bool), Visible = true, Width = 100, ReadOnly = false }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Saturday)} 周六", Field = nameof(TimesInfo.Saturday), DataType = typeof(bool), Visible = true, Width = 100, ReadOnly = false }); columns.Add(new Ctrls.Grid.GridColumn() { Caption = $"{GetThisWeekMonday(System.DayOfWeek.Sunday)} 周日", Field = nameof(TimesInfo.Sunday), DataType = typeof(bool), Visible = true, Width = 100, ReadOnly = false }); dgvTimesInfo.InitColumns(columns);