Skip to Content
0

B1 UI API, how to use menu event to add row in matrix

May 08 at 02:02 AM

21

avatar image

Hi All,

In a Add-on, If I want to add rows to matrix, can i use the right click menu to do it?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

ANKIT CHAUHAN
May 08 at 09:44 AM
0

Hi Fung, Jian Feng Huang,

Yes, you can do it. This can be done as below:

if (pVal.ItemUID == enControlName.Matrix && pVal.FormMode != 0 && pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK && (pVal.ColUID == "col_f"))
{
    SelectedRow = pVal.Row;
    oForm.EnableMenu("1292", true);
    oForm.EnableMenu("1293", true);
}

Then, under the Menu Event you can add a new row to the matrix once the menu "1292" is selected.

if (pVal.MenuUID == "1292")
{
	oMatrix.AddRow();
}

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Show 2 Share
10 |10000 characters needed characters left characters exceeded

thanks very much!

0

Hi Fung, Jian Feng Huang,

Please close the question if your issue is resolved.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0