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...



Thanks for help...

Br, DaT
 
Solution


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


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
Top!!!!
Work's great!

Thank you @Erel ...

Regards, DaT
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…