try
{
Point point = new Point(e.X,e.Y);
GridHitInfo info= this.gridView1.CalcHitInfo(point);
if ((e.Button == MouseButtons.Right) && (info.Column.Name =="col班级"))
{
this.contextMenuStrip1.Visible = true;
}
else
{
this.contextMenuStrip1.Visible = false;
}
}
catch (Exception)
{
}
{
Point point = new Point(e.X,e.Y);
GridHitInfo info= this.gridView1.CalcHitInfo(point);
if ((e.Button == MouseButtons.Right) && (info.Column.Name =="col班级"))
{
this.contextMenuStrip1.Visible = true;
}
else
{
this.contextMenuStrip1.Visible = false;
}
}
catch (Exception)
{
}