Skip to Content
0
Former Member
Nov 16, 2006 at 01:10 PM

Grids

19 Views

Ive been having a bit of hit and miss success when using grids. My question is if I have the following ID for a grid cell:

/app/con[0]/ses[0]/wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG/ctxtVBAP-KDMAT[6,0]

Is the grid id equal to the same without the trailing: /ctxtVBAP-KDMAT[6,0]?

Im trying to load the GuiCtrlGridView object so that I can find the currentCellRow property. If I do the following:

Set grid = connection.sessions.Item(CLng(sesno)).findById("/app/con[0]/ses[0]/wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG")

Dim longVar As Long
longVar = grid.currentCellRow
Dim output As String
output = "selected row: " & CStr(longVar)
intMsg = MsgBox(output)

longVar = 0
longVar = grid.rowCount
output = "row count: " & CStr(longVar)
intMsg = MsgBox(output)

I get a value for the row count but not for the currently selected row. This is why I am asking if my assumption about the grid id is correct.