cancel
Showing results for 
Search instead for 
Did you mean: 

display value in matrix

Former Member
0 Kudos

hi ,

i created matrix in screen painter. it includes 3 columns unit of measurement, length, width.

i want to set values to length and width manually.

when the form is loaded the length and width should appear in matrix

Regards,

Puneeth

Accepted Solutions (0)

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

Hallo,

use the form_load event - here's a c# snippet:


if (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD && pVal.FormType == insertformtype && pVal.BeforeAction = false)
{
            ((SAPbouiCOM.EditText)((SAPbouiCOM.Matrix)(oForm.Items.Item("mtxUID").Specific)).Columns.Item("colUID").Cells.Item(insertrow).Specific).Value = "1";
}

insertformtype = FormType of the form (like AR Invoice 133)

mtxUID = matrix itemUID

colUID = column UID

insertrow = the row you want to change the value

lg David

Former Member
0 Kudos

thanks,

do u know the code in vb.net

Nussi
Active Contributor
0 Kudos

sorry puneeth, at the moment i have only c# and vb6.

but i think you should try this code in vb.net

the "matrix access" should be similar when not the same.

lg David

Former Member
0 Kudos

Davids example in vb.net is

dim oEdit as As SAPbouiCOM.EditText

oEdit = oForm.Items.Item("mtxUID").Specific)).Columns.Item("colUID").Cells.Item(insertrow).Specific

oEdit.value = "1"

Nussi
Active Contributor
0 Kudos

Hi Petr,

ack - vb.net looks like the old vb6 crap

lg David

Former Member
0 Kudos

I make copy paste too quick , actually is it

dim oEdit as As SAPbouiCOM.EditText

dim oMatrix as SAPbouiCOM.Matrix

oMatrix = oForm.Items.Item("mtxUID").Specific

oEdit = oMatrix.Columns.Item("colUID").Cells.Item(insertrow).Specific

oEdit.value = "1"