on 12-10-2013 6:29 AM
just want to ask if it is possible to change the value of the textboxcolumn.
for example, in my CardName column. The display value is "Test BP" but when they click the link button it open the "C0001" which is the CardCode. is that possible in Grid?
Hi Gimo,
It is possible to have the link button display on the Grid. To link the link button the standard way you must link it to the key of the object you are linking to (in this case BusinessPartners).
You can also place a LinkButton on a column with the CardName, but this won't automatically open the correct BusinessPartner. You could capture the Click Event and then get the correct BP key (CardCode) from it's name and open the BP form using the application.OpenForm() function.
Good luck.
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gimo,
If I am not getting Pedro wrong, then you can try this :
On Click Event of Link Button find the value of cardname or cardcode :
oApplication.ActivateMenuItem("2561");
SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)oApplication.Forms.GetForm("134", 1);
Now if you have got the value of CardCode:
SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("5").Specific;
oEdit.Value = "CardCodeValue";
oForm.Items.Item("1").Click(BoCellClickType.ct_Regular);
Now if you have got the value of CardName:
SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("7").Specific;
oEdit.Value = "CardNameValue";
oForm.Items.Item("1").Click(BoCellClickType.ct_Regular);
Hope it helps.
Thanks & Regards
Hi,
Depends on your SBO version.
Check if your SBO_Application object has the method 'OpenForm'
If it does, all you need to do after catching the before matrix link pressed event :
string sCardCode = oGrid.DataTable.GetValue("CardCode", pVal.Row).ToString();
SBO_Application.OpenForm(BoFormObjectEnum.fo_BusinessPartner, "", sCardCode);
Where "CardCode" in the GetValue is the column name in which you keep the CardCode value.
The OpenForm method is already there for a while now. at least 881.
Regards
Edy
thanks edi. But I'm having an error "No matching records found 'Business Partner' (OCRD) (ODBC -2028) [Message 131-183]" when I click the linkbutton, but it open the form. how can I hide that error?
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
Select Case pVal.ItemUID
Case "dgHdr"
Select Case pVal.ColUID
Case "DEALERCDE"
SAP_APP.SBO_Application.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_BusinessPartner, "", oCardCode(dgHdr.DataTable.GetValue("DEALER", pVal.Row)))
End Select
End Select
End Select
Hi Gimo,
SAP_APP.SBO_Application.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_BusinessPartner, "", oCardCode(dgHdr.DataTable.GetValue("DEALER", pVal.Row)))
Return False '<--- add this line. Your error is because of the system event trying to open another BP form also. Since you have handle it your own, tell the system to not process anymore.
OR
Set the
BubbleEvent = false 'if you are not using B1DE
Regards
Edy
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.