Friday, October 10, 2014

Radio Button in dialog Example

// radio Button in dialog

static void RadioDialog(Args _args)
{
    Dialog                dialog;
    FormRadioControl      formRadioControl;
    FormBuildRadioControl formBuildRadioControl;
    FormBuildGroupControl formBuildGroupControl;
    int                   formBuildRadioControlId;
    ;
    dialog                  = new Dialog("Test Dialog RadioButton");
    formBuildGroupControl   = dialog.mainFormGroup();
    formBuildRadioControl   = formBuildGroupControl.addControl(FormControlType::RadioButton,'Bank Details');
    formBuildRadioControlId = formBuildRadioControl.id();
    formBuildRadioControl.items(4);

    formBuildRadioControl.item(1);
    formBuildRadioControl.text("State Bank of India");
    formBuildRadioControl.item(2);
    formBuildRadioControl.text("Indian Bank");
    formBuildRadioControl.item(3);
    formBuildRadioControl.text("ICICI");
    formBuildRadioControl.item(4);
    formBuildRadioControl.text("Indian Overseas Bank");


    if(dialog.run())
    {
        if(formBuildRadioControl)
        {
            formRadioControl = dialog.formRun().control(formBuildRadioControlId);
            info(strfmt("Bank Details of %1 selected",formRadioControl.selection()+1));
        }
    }
}

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...