private
void
dataGridView1_CellContentClick(
object
sender, DataGridViewCellEventArgs e)
{
this
.dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString();
this
.dataGridView1.Rows[e.RowIndex].Cells[
"你所要取值的列名称"
].Value.ToString();
this
.dataGridView1.CurrentRow.Cells[
"你所要取值的列名称"
].Value.ToString();
}
private
void
dataGridView1_CellClick(
object
sender, DataGridViewCellEventArgs e)
{
this
.dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString();
this
.dataGridView1.Rows[e.RowIndex].Cells[
"你所要取值的列名称"
].Value.ToString();
this
.dataGridView1.CurrentRow.Cells[
"你所要取值的列名称"
].Value.ToString();
}
private
void
dataGridView1_CellDoubleClick(
object
sender, DataGridViewCellEventArgs e)
{
this
.dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString();
this
.dataGridView1.Rows[e.RowIndex].Cells[
"你所要取值的列名称"
].Value.ToString();
this
.dataGridView1.CurrentRow.Cells[
"你所要取值的列名称"
].Value.ToString();
}