• 弹窗


    在父页面中添加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);

    这些都是博主多年积累的,有些可能是别人的,但博主已经不记得来自哪里了,就不特殊标出了,望见谅!!!!
  • 相关阅读:
    MVC的各个部分都有那些技术来实现?如何实现?
    spring入门学习
    动态 SQL 及安全性(Birt vs 润乾)
    报表的 SQL 植入风险及规避方法
    web 如何实现精准打印
    birt 报表与润乾报表对比
    ireport 与润乾报表对比
    银行存折套打续打功能 -- 报表如何记录上次打印的位置
    脚本中如何做填报数据校验
    鼠标悬停出现提示信息怎么做
  • 原文地址:https://www.cnblogs.com/objectxhy/p/5896025.html
Copyright © 2020-2023  润新知