1 private void DgvLayerPringSetting_EditingControlShowing(object sender,DataGridViewEditingControlShowingEventArgs e) 2 { 3 var cb = e.Control as ComboBox; 4 5 if (cb != null) 6 { 7 cb.MaxLength = 2; 8 cb.DropDownStyle = ComboBoxStyle.DropDown; 9 cb.AutoCompleteMode = AutoCompleteMode.Suggest; 10 cb.AutoCompleteSource = AutoCompleteSource.ListItems; 11 } 12 }
从容是一种态度。