0

我有gridview,它填充了数据。想在鼠标右键单击事件上启用删除按钮。怎么可能?请帮助我?

4

1 回答 1

0

尝试这个

this.GridView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.GridView_MouseDown);


private void GridView_MouseDown(object sender, MouseEventArgs e)
{
    if(e.Button == MouseButtons.Right)
    {
       //code to enable a button
    }
}
于 2012-10-28T18:27:14.630 回答