HOW TO SET THE ITEM CANT GET FOCUS ISSUE......
THIS IS MY CODE
If (pVal.ItemUID = "mat") AndAlso (pVal.ColUID = "V_5") Then
'MessageBox.Show(Convert.ToString(oMatrix.RowCount))
If oMatrix.RowCount <= 1 Then
Try
'SAPbouiCOM.Item oItem;
Dim val5 As String = Nothing
oForm.Items.Item("mat").Click(SAPbouiCOM.BoCellClickType.ct_Double)
oEdit = oMatrix.Columns.Item("V_5").Cells.Item(pVal.Row).Specific
oEdit.Value = val.ToString()
Catch e As Exception
'IN THIS CATCH BLOCK I AM GETTING ISSUE...........
oEdit1 = oMatrix.Columns.Item("V_4").Cells.Item(pVal.Row).Specific
oEdit1.Value = val1.ToString()
End Try
oMatrix.AddRow(1, -1)
Else
Try
For i As Integer = 1 To oMatrix.RowCount
oEdit = oMatrix.Columns.Item("V_5").Cells.Item(i).Specific
Dim CompareItem As String
CompareItem = oEdit.Value.ToString()
If val = CompareItem Then
SBO_Application.StatusBar.SetText ("Item already exist", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
Exit For
End If
BubbleEvent = True
Next
If BubbleEvent = True Then
Try
oEdit = oMatrix.Columns.Item("V_5").Cells.Item(pVal.Row).Specific
oEdit.Value = val
Catch e As Exception
oEdit1 = oMatrix.Columns.Item("V_4").Cells.Item(pVal.Row).Specific
oEdit1.Value = val1
oMatrix.AddRow(1, -1)
End Try