zoukankan      html  css  js  c++  java
  • DataGrideView下拉列表DataGridViewComboBoxCell选择的控制

    代码
           private void dataGrideTextProp_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
            {
                
    if (dataGrideTextProp.CurrentCell.ColumnIndex == 1 && dataGrideTextProp.CurrentCell.RowIndex != -1)
                {
                    (e.Control 
    as ComboBox).SelectedIndexChanged += new EventHandler(ComboBox_SelectedIndexChanged);
                }
            }

            
    void ComboBox_SelectedIndexChanged(object sender, EventArgs e)
            {
                ComboBox comboBox 
    = sender as ComboBox;
                
    //干自己的事情
                 
    //
                comboBox.SelectedIndexChanged -= new EventHandler(ComboBox_SelectedIndexChanged);
                
    //System.Threading.Thread.Sleep(500);
                
    //comboBox.Hide();
            }
  • 相关阅读:
    POJ 3349 HASH
    POJ 1840 HASH
    POJ 2785 HASH
    HDU 3926 图的同构
    POJ 2549 二分+HASH
    POJ 2002 统计正方形 HASH
    POJ 1971 统计平行四边形 HASH
    POJ 1635 树的最小表示法/HASH
    POJ 1200 字符串HASH
    ACM学习历程—HDU 1272 小希的迷宫(并查集)
  • 原文地址:https://www.cnblogs.com/Y1Focus/p/1895155.html
Copyright © 2011-2022 走看看