本文介绍了我想将数据从Grid View发送到Webform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

protected void OnRowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(GView, "Select$" + e.Row.RowIndex);
                e.Row.ToolTip = "Click to select this row.";
            }
        }
        protected void OnSelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (GridViewRow row in GView.Rows)
            {
                if (row.RowIndex == GView.SelectedIndex)
                {
                    row.BackColor = ColorTranslator.FromHtml("#A1DCF2");
                    row.ToolTip = string.Empty;
                    
                    txtUID.Text = GView.Rows[0].Cells[0].Text;
                }
                else
                {
                    row.BackColor = ColorTranslator.FromHtml("#FFFFFF");
                    row.ToolTip = "Click to select this row.";
                }
            }
        }





i有关于编码并希望发送具体的记录通过单击它进入webform。帮帮我任何人......



i have the about coding and want to send record of the specific row into webform by clicking over it. Help me you any one can......

推荐答案





i有关于编码并希望发送具体的记录通过单击它进入webform。任何人都可以帮助你......



i have the about coding and want to send record of the specific row into webform by clicking over it. Help me you any one can......


这篇关于我想将数据从Grid View发送到Webform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 16:49