Vb.net 跳过不可编辑列上的选项卡索引

Vb.net 跳过不可编辑列上的选项卡索引,vb.net,winforms,c1flexgrid,Vb.net,Winforms,C1flexgrid,如何允许在c1 FlexGrid中设置Tabindex,从而跳过c1 FlexGrid中的特定列 有什么我也能做的吗 谢谢 可能有更好的方法,但这里有一种方法: public partial class Form1 : Form { private Int32 _colIdxToSkip = 4; //Remember, there's an extra column if "Row Headers" are turned on! private Keys _lastKeys

如何允许在c1 FlexGrid中设置Tabindex,从而跳过c1 FlexGrid中的特定列

有什么我也能做的吗


谢谢

可能有更好的方法,但这里有一种方法:

public partial class Form1 : Form
{
    private Int32 _colIdxToSkip = 4;  //Remember, there's an extra column if "Row Headers" are turned on!
    private Keys _lastKeys = Keys.None;

    public Form1()
    {
        InitializeComponent();
        flexGrid.KeyActionTab = C1.Win.C1FlexGrid.KeyActionEnum.MoveAcross;
    }

    private void flexGrid_BeforeRowColChange(Object sender, C1.Win.C1FlexGrid.RangeEventArgs e)
    {
        if (_lastKeys == Keys.Tab && e.OldRange.r1 == e.NewRange.r1 && e.NewRange.c1 == _colIdxToSkip)
        {
            if (_colIdxToSkip == flexGrid.Cols.Count - 1)
            {
                flexGrid.Row = (flexGrid.Row == flexGrid.Rows.Count - 1 ? flexGrid.Rows.Fixed : flexGrid.Row + 1);
                flexGrid.Col = flexGrid.Cols.Fixed;
            }
            else
                flexGrid.Col = _colIdxToSkip + 1;
            e.Cancel = true;
        }
    }

    private void flexGrid_KeyDown(Object sender, KeyEventArgs e)
    {
        _lastKeys = e.KeyCode;
    }
}