Skip to Content
avatar image
Former Member

AddRow with B1 sdk does not move cursor to next row and first column

Hello all,

I have this code that I use once a user click on the last column, a new row is added. The new row adds but the problem is that the cursor does not go to the new row, it stays on the old row. How can I fix this?

#region Add Row
if (pVal.CharPressed == 9 && (pVal.ColUID == "iV_7" || pVal.ColUID == "sV_4") && pVal.Before_Action == false)
{
_form.Freeze(true);
if (_cmbType.Selected.Value == "Item")
{
ClearItemMatrix();
oIMatrix.AddRow();
GenerateIMatrixNo();
}
if (_cmbType.Selected.Value == "Service")
{
ClearServiceMatrix();
oSMatrix.AddRow();
GenerateSMatrixNo();
}
_form.Freeze(false);
}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 28 at 03:12 PM

    This is normal behavior, in this case try to click in the last cell

    YOURMATRIX.Columns.Item(0).Cells.Item(YOURMATRIX.VisualRowCount).Click();

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 01 at 09:37 AM

    Thanks Danilo. Works!

    Add comment
    10|10000 characters needed characters exceeded