修改车次

//gridview行帮定事件 帮定要触发的js函数以及行样式信息
    protected void GridViewDataInfo_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string strId = GridViewDataInfo.DataKeys[e.Row.RowIndex].Value.ToString();

            e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#C6C3C6'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");

            e.Row.Cells[0].Attributes.Add("onclick", "editCheci(" + strId + ")");

        }
    }

<script type="text/javascript">

function editCheci(strId)
{
       window.showModalDialog("EditCheci.aspx?rowId="+strId,null, "dialogWidth=300px;dialogHeight=250px;toolbar=no;menubar=no;scrollbars=no;resizable=no;location=no;status=no;");
}

</script>

原文地址:https://www.cnblogs.com/jcomet/p/1281734.html