日期:2014-05-18  浏览次数:20443 次

双击Gridview中某一行就弹出对话框显示详细信息如何实现
请问   Gridview邦定数据后,双击某一行,就弹出一个对话框显示详细信息同时也可以修改其中的内容。怎么作出来,用什么思想。谢谢!


------解决方案--------------------
protected void myGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add( "ondblclick ", "window.open( 'modify.aspx?id= " + e.Row.Cells[1].Text + " ', ' ', 'width=400,height=300 ') ");
}
}
===============================
其实跟freeboy827() 一个意思。只不过把JavaScript也写在cs文件了