日期:2014-05-17 浏览次数:21235 次
private void Form2_Load(object sender, EventArgs e)
{
dataGridView1.RowHeaderMouseClick += new DataGridViewCellMouseEventHandler(dataGridView1_RowHeaderMouseClick);
}
void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
MessageBox.Show("点击了行标题");
}
void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
MessageBox.Show("点击了行标题");
}
}