Skip to Content
author's profile photo Former Member
Former Member

How to set value on textbox item ?

how to set value in text box item on choose_from_list_afteraction event

vall.SetValue("edtxt2", pVal.ItemUID, oDataTable.GetValue("edtxt2").ToString());

which r not working .

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 27, 2013 at 06:25 AM

    Hi Mohammad Asharaf,

    Try this on pVal.BeforeAction == false of Choose_From_List Event on the form:

    SAPbouiCOM.ChooseFromListEvent cflevent = (SAPbouiCOM.ChooseFromListEvent)pVal;

    SAPbouiCOM.ChooseFromList oCFLEvento = default(SAPbouiCOM.ChooseFromList);

    string strUid = cflevent.ChooseFromListUID;

    oCFLEvento = this.m_SBO_Form.ChooseFromLists.Item(strUid);

    SAPbouiCOM.DataTable oDataTable = cflevent.SelectedObjects;

    if (pVal.ItemUID == enControlName.CustomerCode && pVal.FormMode != 0)

    {

    string Code = Convert.ToString(oDataTable.GetValue("CardCode", 0));

    string Name = Convert.ToString(oDataTable.GetValue("CardName", 0));

    string FName = Convert.ToString(oDataTable.GetValue("CardFName", 0));

    string Unit = Convert.ToString(oDataTable.GetValue("U_Unit", 0));

    SAPbouiCOM.DBDataSource oDataSource;

    oDataSource = (DBDataSource)m_SBO_Form.DataSources.DBDataSources.Add("@SERVICE_MASTER");

    oDataSource.SetValue("U_CCode", 0, Code);

    oDataSource.SetValue("U_CName", 0, Name);

    oDataSource.SetValue("U_Samson", 0, FName);

    oDataSource.SetValue("U_UnitNo", 0, Unit);

    }

    Hope it is helpful.

    Thanks & Regards

    Ankit Chauhan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.