on 02-21-2008 9:11 AM
I want to select vendor from the list.For this I have loaded vendor list in grid.How to get the value of selected vendor into variable ? For this I have used following code-
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
Dim dtgGrid As SAPbouiCOM.Grid
Dim strVendorCode As String
Dim strVendorName As String
Dim dtgRows As SAPbouiCOM.GridRows
Dim dtgColumns As SAPbouiCOM.GridColumns
Try
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.Before_Action = True And pVal.ItemUID = "dtgGrid" Then
dtgGrid = SBO_Application.Forms.ActiveForm.Items.Item("dtgGrid").Specific
dtgGrid.Rows.SelectedRows.Add(pVal.Row)
strVendorCode = dtgGrid.Rows.SelectedRows.Item(1, SAPbouiCOM.BoOrderType.ot_RowOrder)
strVendorName = dtgGrid.Rows.SelectedRows.Item(1, SAPbouiCOM.BoOrderType.ot_SelectionOrder)
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End Sub
But I could not get the value in the variable strVendorName .
Hi,
i would access value with the datatable
something like:
oForm = SBOApplication.Forms.Item(FormUID)
oGrid = oForm.Items.Item("grid").Specific
oGrid.DataTable.Columns.Item("insertthecolumnname").Cells.Item(i).Value
regards
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.