单元格:Cell1 cell2 cell3 cell4
Cell1 cell2 cell3 cell4
Cell1 cell2 cell3 cell4
Cell1 cell2 cell3 cell4想要实现的效果:光标停在第一行cell2,按下Tab,让cell4获得焦点。具体的事件控制,感觉太麻烦了。
有没有更好的方法,比如设置cell的Tabstop(好像没有这个属性)
Cell1 cell2 cell3 cell4
Cell1 cell2 cell3 cell4
Cell1 cell2 cell3 cell4想要实现的效果:光标停在第一行cell2,按下Tab,让cell4获得焦点。具体的事件控制,感觉太麻烦了。
有没有更好的方法,比如设置cell的Tabstop(好像没有这个属性)
用dgv的事件我知道是可以实现的,但是很麻烦,而且可能出现许多意想不到的副作用
datagridview的单元格焦点控制正是按 TAB 键啊!!!!
除非设置了 selectionmode 为 fullrow ,那样选择的是整行,当然不能用 tab 键切换
我觉得要实现恐怕只有处理键盘事件,或是 CellEnter 事件
private void _chkBoxGrid_CellEnter(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 2)
{
_chkBoxGrid[2, e.RowIndex].Selected = false;
_chkBoxGrid[3, e.RowIndex].Selected = true;
}
}