Kleiner Trick, um die Combobox-Spalaten von DataGridView beschreibbar zu machen
/// <summary>
/// Behandlung für das EditingControlShowing-Ereignis von DataGridView
/// </summary>
private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
DataGridViewComboBoxEditingControl ctrl = e.Control as DataGridViewComboBoxEditingControl;
if (ctrl != null)
ctrl.DropDownStyle = ComboBoxStyle.DropDown;
}
Kommentare zum Snippet