Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8808

"Form - Bad Value" error after choose a value from cfl

$
0
0

Hi everyone,

 

I want to select a value from a choosefromlist and put it back to a EditText "TXT_TEMPLATE". This EditText is bounded to a field in the table ODLN. I created a property in the form where the EditText is, and set the public property to the value chosen from the cfl.

 

Code:

     public SAPbouiCOM.Form m_oForm = this.SBO_Application.Forms.Item(FormUID);

 

//bound the EditText to a table field

     SAPbouiCOM.Item oItem = m_oForm.Items.Add(TXT_TEMPLATE, SAPbouiCOM.BoFormItemTypes.it_EDIT);

     oItem.Specific.DataBind.SetBound(true, "ODLN", USERFIELD_TEMP);

 

//Set the value to the  EditText

      private string templateID=string.Empty;

        public string TemplateID

        {

            set

            {

                templateID = value;

                m_oForm.Items.Item(TXT_TEMPLATE).Specific.Value = templateID;

            }

        }

 

When it gets to the property TemplateID, it can get the correct value. But it returns an error "From - Bad Value" when it gets to the line:

     m_oForm.Items.Item(TXT_TEMPLATE).Specific.Value = templateID;

 

 

I can successfully set a string to the EditText when initialize it.

     m_oForm.Items.Item(TXT_TEMPLATE).Specific.Value = result[0]["U_TemplateID"].ToString();

 

 

I don't know what is wrong. Can anyone help on this problem?

 

Thanks


Viewing all articles
Browse latest Browse all 8808

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>