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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...