Position center and height for C1Dialog 2025v2 399

Posted by: enrique.pv-ext on 3 June 2026, 2:58 am EST

    • Post Options:
    • Link

    Posted 3 June 2026, 2:58 am EST

    Hi,

    Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.

    Using C1Dialog from C1.Web.Wijmo.Controls.48.dll

    using

    c1dialog({ position: 'center' });


    and

    c1dialog({ height: height });

    is valid ?

        dialog = $("#<%= VoucherBreakDownWindow.ClientID %>");
        if (height) {
            dialog.c1dialog({ height: height });
        }
        dialog.c1dialog({
            modal: true
        });
        dialog.c1dialog({ position: 'center' });
        dialog.c1dialog("open");

    any suggestions ?

  • Posted 3 June 2026, 5:25 am EST

    Hello Enrique,

    Each call to c1dialog({ … }) (passing a plain object) is treated as a constructor/initialization call in jQuery UI-style widgets. Calling it multiple times like this can cause each call to reset or overwrite previously set options, because it may re-initialize the widget from scratch each time.

    The correct way is to call c1dialog(“option”, “key”, value) jQuery widget pattern for updating options on an already-initialized widget. It modifies the live instance without re-creating it as follows:

    var dialog;
    var height = '500';
    function OpenDialog() {
        dialog = $("#<%= VoucherBreakDownWindow.ClientID %>");
        if (height) {
            dialog.c1dialog("option", "height", height);
        }
        dialog.c1dialog("option", "modal", true);
        dialog.c1dialog("option", "position", 'center' );
        dialog.c1dialog("open");
    }

    Sample: Dialog_Sample.zip

    Please let us know if you have further queries.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels