// 点击table 填充数据 激活按钮 private void DataGridView1_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow != null) { OtherFunction otherFunction = new OtherFunction(); label2.Text = otherFunction.GetSelectValue(dataGridView1)[0]; textBox1.Text = otherFunction.GetSelectValue(dataGridView1)[1]; button1.Enabled = true; button2.Enabled = true; textBox1.Enabled = true; } }