第二个方案相关代码:
- private void button1_MouseHover(object sender, EventArgs e)
- {
- this.gcMultiRow1.CellEnter -= gcMultiRow1_CellEnter;
- this.gcMultiRow1.CurrentCell = this.gcMultiRow1[0, 0];
- gcMultiRow1_CellEnter(null, null);
- this.gcMultiRow1.CellEnter += gcMultiRow1_CellEnter;
- }
- private void gcMultiRow1_CellEnter(object sender, CellEventArgs e)
- {
- this.gcMultiRow1.CurrentCell = this.gcMultiRow1[0, 1];
- }
复制代码 |