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

Radio Button SDK 2007

Hi,

I have 6 radio buttons (2x3), and all buttons are off when I load the form.

I like to set 1 button on when I load the form.

I used following code and 2 radio buttons goes on?

( ( SAPbouiCOM.OptionBtn ) ( oForm.Items.Item("optDay4").Specific ) ).Selected = true;

// Per Day

oItem = oForm.Items.Add("optDay4", SAPbouiCOM.BoFormItemTypes.it_OPTION_BUTTON);

oItem.Left = 850;

oItem.Top = 160;

oItem.FromPane = 4;

oItem.ToPane = 4;

oOptionBtn = ( ( SAPbouiCOM.OptionBtn ) ( oItem.Specific ) );

oOptionBtn.Caption = "Per Day";

oOptionBtn.DataBind.SetBound(true, "", "OpBtnDS4");

I like to set the button on here.

1) Why are my two (2) radio button column connected with each other (they are not grouped with each other "oOptionBtn.GroupWith("optNo4");" and oOptionBtn.GroupWith("optDay4");

2) How do I set the radio button on when I build the radio button to the form?

Thank you,

Rune

Message was edited by:

Rune Brattas

Message was edited by:

Rune Brattas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 09:12 PM

    Please mark this question as Answered. Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 07:05 PM

    I found the solution. Create a user datasource for both rows of option buttons:

    // Option button. Create a user Datasource for the option buttons

    UDSTab4 = oForm.DataSources.UserDataSources.Add("OpBtnDS4A", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

    UDSTab4 = oForm.DataSources.UserDataSources.Add("OpBtnDS4B", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

    Thank you

    Rune

    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.