想达到这样的效果:点击datagrid中的某单元格时候,将此单元格数值传给 文本框!

解决方案 »

  1.   

    参考protected void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType == DataControlRowType.DataRow)
            {
                e.Item.Attributes.Add("onclick", "if(document.oldTr !=null){document.oldTr.runtimeStyle.cssText='';}this.runtimeStyle.cssText='background-color:red';document.oldTr=this;window.showModelessDialog('bb.aspx?id=" + e.Row.Cells[0].Text + "');");
            }
        }
      

  2.   

    传给 文本框?文本框在哪里的 ?单独的?DataGrid里的?
      

  3.   

    两个独立的
    1 就是独立的TEXT
    2 另外一个datagrid里的 某帮定TEXT
      

  4.   

    Click the link to solve your problem.Good luck!