void ReBindSeatSubType(DataGridViewRow row) { //if (row.Cells[3].Value == null) row.Cells[3].Value = 1; //if (row.Cells[2].Value == null) //{ // row.Cells[3].ReadOnly = true; // return; //} //var seatType = (char)row.Cells[2].Value; //row.Cells[3].ReadOnly = !(seatType == '2' || seatType == '3' || seatType == '4' || seatType == '6'); var seatCell = (DataGridViewComboBoxCell)row.Cells[3]; seatCell.Items.Clear(); if (row.Cells[2].Value != null) { var seat = (char)row.Cells[2].Value; seatCell.Items.Add(new SeatSubType(SubType.Random)); var sublist = ParamData.GetSeatSubTypeEntityList(seat); if (sublist != null) { seatCell.Items.AddRange(sublist); } seatCell.Value = SubType.Random; } }