c# Datagridview 设置单位格为编辑状态(in editing mode)


private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.Tab && dataGridView1.CurrentCell.ColumnIndex == 1)
        {
            e.Handled = true;
            DataGridViewCell cell = dataGridView1.Rows[0].Cells[0];
            dataGridView1.CurrentCell = cell;
            dataGridView1.BeginEdit(true);               
        }
    }


本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/p/4255248.html,如需转载请自行联系原作者

你可能感兴趣的:(c# Datagridview 设置单位格为编辑状态(in editing mode))