cancel
Showing results for 
Search instead for 
Did you mean: 

Get the value in matrix

Former Member
0 Kudos

Hello,

I try to get the value in a matrix. The problem that I don't know how to get the number of the row selected.

Someone have an idea to help me please

Thks

Laetitia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

this function determine is selected row in Matrix

Code C#:

private bool RowMatrixSelectedControl(SAPbouiCOM.Matrix mtx)

{

int i = 0, iCount = 0;

while(true)

{

i = mtx.GetNextSelectedRow(i,

SAPbouiCOM.BoOrderType.ot_RowOrder);

if (-1 == i)

break;

iCount++;

}

if (iCount > 0)

return true;

else

return false;

}

Former Member
0 Kudos

Hi,

I use VB.NET and I have tried a similary code as your but it does not work.

TKS

barend_morkel2
Active Contributor
0 Kudos

Hi Laetitia,

On the ItemEvent sub -> use pVal.Row to get the selected row.

Former Member
0 Kudos

SAPbouiCOM.Application ap;

string sItemValue = ap.Forms.Item("strFormUID").DataSources.UserDataSources.Item("Item").Value;

Former Member
0 Kudos

Hi,

I have tried with pval.row too, but it doesn't work to.

It always returns 0

Former Member
0 Kudos

SAPbouiCOM.Matrix m_mtx = (SAPbouiCOM.Matrix)this.GetFormControl("mtx").Specific;

m_mtx.GetLineData(iRow);

then get value using SAPbouiCOM.UserDataSource

Answers (0)