cancel
Showing results for 
Search instead for 
Did you mean: 

How to add linked button in grid?

former_member244307
Participant
0 Kudos

Hi,

Does anyone know how to add linked button in a grid? I can't find it but i saw someone ask similar question but seems none of them works.

Thanks a lot!

P.S. For some reason, i can't use matrix because the data is from a SQL query.

Lan

Accepted Solutions (0)

Answers (1)

Answers (1)

CRVMANISH
Contributor
0 Kudos

Hi Zhanglan,

Use this

Dim oCol As SAPbouiCOM.EditTextColumn
            oCol = oGrid.Columns.Item("Employee ID")
            oCol.LinkedObjectType = "30"

former_member244307
Participant
0 Kudos

Hi Gordon and Manish,

Now my linked button is working now in my grid.

Thank you!

But there is another question coming out. Is it possible that i can open different object when user click the linked button in different row ? For example, in my grid, in the first row when user click the linked button it will open PO, but if he click the linked button in row 2 then it will open SO. If it is possible, then how i can do it?

Thanks in advandance!

Lan

Former Member
0 Kudos

Hi,

as far as I know it is not possible, since this adjustment is made for the whole column. I have created a grid and I open the shown document by double clicking the row header. In the grid I can see if it is sales or purchase and so I use a workaround by opening the specific system form (e.g. sales invoice) in find mode and search the document by document number (also shown in the grid).

Sample:


oSBOapp.ActivateMenuItem("2053"); //sales invoice
oForm = oSBOapp.Forms.ActiveForm;
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("8").Specific;
oEdit.Value = Convert.ToString(dNum);
oForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);

By the click event, you get the specific row number. Hope it helps...

Regards

Sebastian

former_member244307
Participant
0 Kudos

Thanks Sebastian, i will try your solution.

But there is a thought coming into my mind and i tried but not working. My idea is to capture the on click event on the linked button and change the column linked_object_type when user each time click the linked button. My problem is i can't capture the on click event of that kinked button.

Lan