Skip to Content
0
Former Member
Jul 22, 2008 at 04:41 AM

TextBox Focus

115 Views

Hi All,

I used following code for choose from list, but in this it throw error as,

"Item - Can't set value on item because the item can't get focus. [66000-153]"

I have taken two textbox when i give TAB on first textbox it takes value but when i wil give again TAB that time first it goes next textbox but first textbox value now show means blank. Can anybody suggest me what i do ?

<B1Listener(BoEventTypes.et_CHOOSE_FROM_LIST, False)> _

Public Overridable Sub OnAfterChooseFromList(ByVal pVal As ItemEvent)

Dim ActionSuccess As Boolean = pVal.ActionSuccess

Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)

Dim item As Item = form.Items.Item("txt_CstCod")

Dim edittext As EditText = CType(item.Specific, EditText)

Dim item_custname As Item = form.Items.Item("txt_CstNm")

Dim item_txt_custnm As EditText = (item_custname.Specific)

Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent

oCFLEvento = pVal

Dim sChooseFromListUID As String

sChooseFromListUID = oCFLEvento.ChooseFromListUID

Dim oChooseFromList As SAPbouiCOM.ChooseFromList

oChooseFromList = form.ChooseFromLists.Item(sChooseFromListUID)

Dim oDataTable As SAPbouiCOM.DataTable

oDataTable = oCFLEvento.SelectedObjects

Dim sName As String = ""

Try

sName = oDataTable.GetValue(14, 0)

edittext.Value = sName

Catch ex As Exception

sName = ""

End Try

'ADD YOUR ACTION CODE HERE ...

End Sub