B4J Question InLineEdit - Enter new value and go to next row

DarkoT

Active Member
Licensed User
Hi guys,
need little help... I'm using InlineEdit for B4XTableView. It's possible to add new functionality to "send" cursor to next row, after user enter new value?

Now system sends the focus to button - outside of grid when user input data and press Enter...
User need always click into field after there input the data - please see picture...

2021-10-18_08h53_04.gif


Thanks for help...

Br, DaT
 
Solution
rQioKa3ruq.gif


Based on the example:
B4X:
Sub TextField1_Action
    ie.ExitEditMode
    Dim visibleindex As Int = ie.CurrentlyFocusedCell.VisibleIndex
    Sleep(0)
    Dim nextrowid As Long = IIf(B4XTable1.VisibleRowIds.Size > visibleindex + 1, B4XTable1.VisibleRowIds.Get(visibleindex + 1), 0)
    If nextrowid > 0 Then
        If ie.CurrentlyFocusedCell.ColumnId = "String" Then
            ie.CellClicked(ie.CurrentlyFocusedCell.ColumnId, nextrowid)
        End If
    End If
End Sub

Erel

B4X founder
Staff member
Licensed User
Longtime User
rQioKa3ruq.gif


Based on the example:
B4X:
Sub TextField1_Action
    ie.ExitEditMode
    Dim visibleindex As Int = ie.CurrentlyFocusedCell.VisibleIndex
    Sleep(0)
    Dim nextrowid As Long = IIf(B4XTable1.VisibleRowIds.Size > visibleindex + 1, B4XTable1.VisibleRowIds.Get(visibleindex + 1), 0)
    If nextrowid > 0 Then
        If ie.CurrentlyFocusedCell.ColumnId = "String" Then
            ie.CellClicked(ie.CurrentlyFocusedCell.ColumnId, nextrowid)
        End If
    End If
End Sub
 
Upvote 0
Solution

DarkoT

Active Member
Licensed User
rQioKa3ruq.gif


Based on the example:
B4X:
Sub TextField1_Action
    ie.ExitEditMode
    Dim visibleindex As Int = ie.CurrentlyFocusedCell.VisibleIndex
    Sleep(0)
    Dim nextrowid As Long = IIf(B4XTable1.VisibleRowIds.Size > visibleindex + 1, B4XTable1.VisibleRowIds.Get(visibleindex + 1), 0)
    If nextrowid > 0 Then
        If ie.CurrentlyFocusedCell.ColumnId = "String" Then
            ie.CellClicked(ie.CurrentlyFocusedCell.ColumnId, nextrowid)
        End If
    End If
End Sub
Top!!!!
Work's great!

Thank you @Erel ...

Regards, DaT
 
Upvote 0
Top