zoukankan      html  css  js  c++  java
  • Ext.Net弹出子窗口

    1、前台代码:

    <ext:ImageCommandColumn Width="60" Header="操作" Align="Center">
                                                <Commands >
                                                    <ext:ImageCommand CommandName="Edit" Icon="TableEdit" Text="操作">
                                                        <ToolTip Text="操作" />
                                                    </ext:ImageCommand>
                                                </Commands>
      </ext:ImageCommandColumn>

    <Listeners>
                           
                                        <%--<Command Handler="Ext.Msg.alert(command, record.data.mc_MaterialCode);" />--%>
                                        <%--<Command Handler="CompanyX.showPage(record.data.Id);"/>--%>
                                        <Command Handler="showWindow(record.data.Id);"/>
                                       
                                     <%--  #{Window1}.show(this);--%>

    </Listeners>

    2、弹出子页面方法

    第一种:

    [Ext.Net.DirectMethod]
            public void showPage(string ss)
            {
                var win = new Ext.Net.Window
                {
                    ID = "Window1",
                    Title = "使用记录",
                    Width = Unit.Pixel(1000),
                    Height = Unit.Pixel(600),
                    Modal = true,
                    Collapsible = true,
                    Maximizable = true,
                    Hidden = true
                };


                win.AutoLoad.Url = "~/StorageRecord/UsedDetail.aspx?ID=" + ss;
                win.AutoLoad.Mode = Ext.Net.LoadMode.IFrame;
                win.Render(this.Form);

                win.Show();
            }

    第二种:

    <script type="text/javascript">
            function showWindow(maCode) {
                var iTop = (window.screen.availHeight - 30 - 400) / 2;
                //获得窗口的水平位置
                var iLeft = (window.screen.availWidth - 10 - 800) / 2;
                //window.showModalDialog("UsedDetail.aspx?ID=" + maCode, "使用明细", "dialogHeight=400px,dialogWidth=800,center=yes,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no, status=no");
                window.open("UsedDetail.aspx?ID=" + maCode, "使用明细", "dialogHeight=400px,dialogWidth=800,left=" + iLeft + ",top=" + iTop + ",center=yes,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no, status=no");
                }
            </script>

  • 相关阅读:
    Raspberry pi raspbain source mirror
    Raspberry pi 定时天气播报
    Raspberry pi 2 wireless settings.
    MATLAB 图像处理-线性变换和直方图均衡
    求向量组的等价正交单位向量组-施密特正交化 C 语言 算法
    矩阵的逆 C 语言 算法二
    矩阵的逆 C 语言 算法一
    线性方程组 解的判别 与解的结构
    How to install .bundle packages in Ubuntu?
    C 语言期中考试 程序分析
  • 原文地址:https://www.cnblogs.com/spring_wang/p/3072210.html
Copyright © 2011-2022 走看看