X.Msg.Info modal=true not runing

  1. #1

    X.Msg.Info modal=true not runing

    Code Behind cs file
    the following code running, but Modal= true not running

            public void XMsgInfo(string title, string html, Ext.Net.Icon icon, Ext.Net.UI ui, bool autohide, bool modal)
            {
                Ext.Net.Button ExtNetBtnAccept = new Ext.Net.Button
                {
                    Text = "ok",
                    Handler = "this.up('infopanel').destroy();",
                    Icon = Ext.Net.Icon.Accept,
                    PaddingSpec = "5"
                };
    
                X.Msg.Info(
                            new InfoPanel
                            {
                                Icon        = icon,
                                StyleSpec   = "box-shadow: 4px 4px 8px rgba(0, 0, 0, .175);",
                                Title       = title,
                                Html        = html,
                                AutoHide    = autohide,
                                UI          = ui,
                                Buttons     = { ExtNetBtnAccept },
                                Modal       = modal,
                                Alignment   = AnchorPoint.Center
                            }
                        ).Show();
            }
  2. #2
    Hi @hakandonmez,

    Thank you for the report. Created an Issue.
    https://github.com/extnet/Ext.NET/issues/621

    Also another issue has been discovered.
    https://github.com/extnet/Ext.NET/issues/622

    I've fixed that locally and will commit to SVN soon. It will go to the v3.1.0 release.

    Here is an example with both the fixes applied.

    Example
    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void Show(object sender, DirectEventArgs e)
        {
            this.XMsgInfo("title", "html", Icon.Cake, UI.Danger, false, true);
        }
    
        public void XMsgInfo(string title, string html, Ext.Net.Icon icon, Ext.Net.UI ui, bool autohide, bool modal)
        {
            Ext.Net.Button ExtNetBtnAccept = new Ext.Net.Button
            {
                Text = "ok",
                Handler = "this.up('infopanel').destroy();",
                Icon = Ext.Net.Icon.Accept,
                PaddingSpec = "5"
            };
    
            X.Msg.Info(
                new InfoPanel
                {
                    Icon = icon,
                    StyleSpec = "box-shadow: 4px 4px 8px rgba(0, 0, 0, .175);",
                    Title = title,
                    Html = html,
                    AutoHide = autohide,
                    UI = ui,
                    Buttons = { ExtNetBtnAccept },
                    Modal = modal,
                    Alignment = AnchorPoint.Center
                }
            ).Show();
        }
    </script>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v3 Example</title>
    
        <style>
            div.x-mask {
                border: none;
            }
        </style>
    
        <script>
            Ext.net.InfoPanel.override({
                toFront: function () {
                    this.setZIndex(this.zIndexManager.zseed);
    
                    if (this.modal) {
                        this.zIndexManager._showModalMask(this);
                    }
                }
            });
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Button runat="server" Text="Show" OnDirectClick="Show" />
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] How to format one grid cell info based on other cell info?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 01, 2013, 2:12 PM
  2. [CLOSED] Problem when runing on IE9...
    By RCN in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 08, 2012, 9:04 PM
  3. Lock the parent (Modal=true)
    By mário in forum 1.x Help
    Replies: 4
    Last Post: Jul 20, 2010, 6:55 PM
  4. [CLOSED] Specified cast is not valid runing menu example for v1.0
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 28, 2010, 11:54 AM
  5. Runing Server Code On TreeNode Click
    By mightypirate in forum 1.x Help
    Replies: 6
    Last Post: Feb 20, 2009, 10:49 AM

Posting Permissions