cancel
Showing results for 
Search instead for 
Did you mean: 

UI: I canu00B4t get the content from a matrix cell,

Alfredo_Lagunar
Participant
0 Kudos

Hye. I`m very very junior about this and SDK.

I have a matrix with data from database table.All is ok and now I want to get the content from a selected cell.

How can I do that?

I select a cell in my matrix.

Later I check "isrowselected(i)" in each row and always is false, why?

I use also "mymatrix.GetNextSelectedRow(0,ot_RowOrder)" but all I get "-1".

I would like to get an example or information about how I can get that.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Francisco:

I hope this bit of code may help you.

I have this code from a user matrix filled with data from a specific query to a user table but it's the same with any matrix with any type of data.

If pVal.EventType = et_DOUBLE_CLICK Then

If pVal.Row > 0 Then

'if pval.row is < 0 it means a row hasn't been selected

Aux.SelectRow pVal.Row, True, False

'Aux is a SAPbouiCom.Matrix object which holds the info in my matrix

Set AuxMax = Aux.Columns.Item(1).Cells.Item(Aux.GetNextSelectedRow).Specific

'AuxMax is a SAPbouiCom.EditText to extract the data of a cell

'Columns.Item(1) is the first column in my matrix

'Item(Aux.GetNextSelectedRow) is the selected row

'.Specific is the content of the cell

msgbox "The value of the cell is: " & AuxMax.String

'The value of the cell it's contained in AuxMax.String

End If

End If