可以通过HitTest方法来判断当前点击的是列头、列脚还是数据区域:
- private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
- {
- var hi = fpSpread1.HitTest(e.X, e.Y);
- switch (hi.Type)
- {
- case FarPoint.Win.Spread.HitTestType.ColumnFooter:
- //列脚
- break;
- case FarPoint.Win.Spread.HitTestType.ColumnHeader:
- //列头
- break;
- case FarPoint.Win.Spread.HitTestType.Corner:
- //表角
- break;
- default:
- break;
- }
- }
复制代码 |