zoukankan      html  css  js  c++  java
  • 弹窗

    在父页面中添加JS代码:

     <script type="text/javascript" language="javascript">

          

            $(document).ready(function () {

                setGridScroll('<%= grvArea.ClientID %>', '80');

                new superTable('<%= grvArea.ClientID %>', {

                    cssSkin: "sSky",

                    headerRows: 1

                });

            });

            //

         

            function showModal(type) {

                var obj = new Object();

                obj.type = type;

                var sdate = $get('<%= Sdate.ClientID %>').value;

                var edate = $get('<%= Edate.ClientID %>').value

                var colname = $get('<%= MemType.ClientID %>').value;

                

                var uid = window.showModalDialog("CustomListView.aspx?rowId=" + type + "&Type=View&Sdate=" + sdate+"&EDate="+ edate +"&txtype="+ colname, obj, "dialogHeight:500px;dialogWidth:1200px;center:1;help:0;scroll:yes;location:no;status:yes");

                

            }

        </script>

    .CS里面:

     protected void grvArea_RowDataBound(object sender, GridViewRowEventArgs e)

            {

                if (e.Row.RowType == DataControlRowType.DataRow)

                {

                    SetGridCellId(grvArea, e.Row, "PkId", "id");

                    e.Row.Attributes["ondblclick"] = "dblClick(this,'" + GetFromUrl() + "');";

                    //e.Row.Cells[1].Attributes["onclick"] = "showModal('" + DataBinder.Eval(e.Row.DataItem, "PkId").ToString() + "');";

                    //e.Row.Cells[1].Text = "<a href='#'>" + DataBinder.Eval(e.Row.DataItem, "CustomId").ToString() + "</a>";

                    e.Row.Cells[1].Attributes["onclick"] = "showModal('" + DataBinder.Eval(e.Row.DataItem, "type").ToString() + "');";

                    e.Row.Cells[1].Text = "<a href='#'>" + DataBinder.Eval(e.Row.DataItem, "count").ToString() + "</a>";

                    //e.Row.Cells[1].Text = "<a href='#'>" + DataBinder.Eval(e.Row.DataItem, "type").ToString() + "</a>";

                    //string type1 = DataBinder.Eval(e.Row.DataItem, "type").ToString();

                    //Session["type1"] = type1;

                }

                //if (e.Row.RowType == DataControlRowType.Header)

                //{

                //}

                //if (e.Row.RowType == DataControlRowType.DataRow)

                //{

                //    e.Row.Cells[0].Text = (e.Row.RowIndex + 1).ToString();

                //    e.Row.Attributes["onclick"] = "selectrow(this);SavePkId(this);";

                //    // e.Row.Attributes["ondblclick"] = "dblClick(this,'" + GetFromUrl() + "');";

                //    SetGridCellId(grvArea, e.Row, "type", "type");

                //    SetGridCellId(grvArea, e.Row, "count", "count");

                //    //SetGridCellId(grvArea, e.Row, "Mpkid", "mpkid");

                //    //SetGridCellId(grvArea, e.Row, "qc", "qc");

                //    try

                //    {

                //        total1 += Convert.ToDecimal(e.Row.Cells[8].Text);

                //        total2 += Convert.ToDecimal(e.Row.Cells[9].Text);

                //        total3 += Convert.ToDecimal(e.Row.Cells[10].Text);

                //    }

                //    catch { }

                //}

                //if (e.Row.RowType == DataControlRowType.Footer)

                //{

                //    e.Row.Cells[8].Text = total1.ToString();

                //    e.Row.Cells[9].Text = total2.ToString();

                //    e.Row.Cells[10].Text = total3.ToString();

                //}

            }

    弹出信息窗口:

     //获?取?type的?值μ...............

                string type = QueryString("txtype");           

                 dict.Add("@type", type);

    这些都是博主多年积累的,有些可能是别人的,但博主已经不记得来自哪里了,就不特殊标出了,望见谅!!!!
  • 相关阅读:
    AIR配置文件(*app.xml)说明
    重学AS3之基础知识重点记忆
    重学AS3之高级知识重点记忆
    FLEX AIR添加系统托盘图标步骤
    FLASH组件在FLEX中使用
    ASP.NET入门教程:数据绑定
    ASP.NET入门教程:Web表单维持对象的ViewState
    ASP.NET入门教程:简单的ASP.NET页面
    ASP.NET入门教程:事件句柄
    ASP.NET入门教程:TextBox控件
  • 原文地址:https://www.cnblogs.com/objectxhy/p/5896025.html
Copyright © 2011-2022 走看看