可以通过下面的方法,分别绑定的事件是MouseClick,MouseEnterCell,MouseLeaveCell
- private void c1FlexGrid1_MouseClick(object sender, MouseEventArgs e)
- {
- MessageBox.Show(incell ? c1FlexGrid1.Row.ToString() : "-1");
- }
- bool incell=false;
- private void c1FlexGrid1_MouseEnterCell(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
- {
- incell = true;
- }
- private void c1FlexGrid1_MouseLeaveCell(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
- {
- incell = false;
- }
复制代码 |