on 01-19-2015 5:11 PM
Hello.
I would like to add Edit Item to system form that is bound to user-defined-field and is read-only.
Also I need LinkButton that is linked to newly created Edit Item.
My code:
SAPbouiCOM.Item oNewItemEdit;
oNewItemEdit = frm.Items.Add(cMyEdit, BoFormItemTypes.it_EDIT);
SAPbouiCOM.Item oNewItemLnk = frm.Items.Add(cMyLBt, BoFormItemTypes.it_LINKED_BUTTON);
SAPbouiCOM.EditText oMyEdit = ((SAPbouiCOM.EditText)(oNewItemEdit.Specific));
((SAPbouiCOM.LinkedButton)(oNewItemLnk.Specific)).Item.LinkTo = cMyEdit;
oMyEdit.DataBind.SetBound(true, "OPCH", "U_MyField");
oMyEdit.Item.Enabled = false;
I suppose that property Enabled is the right one, but it seems SAP B1 always set newly added Edit Item as editable.
Regards,
Pawel
Hi Pawel,
just append this line to your code:
oMyEdit.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Editable, 15, SAPbouiCOM.BoModeVisualBehavior.mvb_False);
The problem you are experiencing results from the auto from mode managment of SBO ( different mode -> standard value : editable )
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
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.