private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Left)//单击
{
if (e.ColumnIndex /*按钮的列号*/== dataGridView1.Columns["Button"/*按钮所在列的名字*/].Index)
{
//e.RowIndex 是用户点击的按钮的行号
}
}
}
{
if (e.Button == MouseButtons.Left)//单击
{
if (e.ColumnIndex /*按钮的列号*/== dataGridView1.Columns["Button"/*按钮所在列的名字*/].Index)
{
//e.RowIndex 是用户点击的按钮的行号
}
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货