GridView中如何用行上的点击事件取代select事件

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
        e.Row.Cells[0].Style.Add("display", "none");//选择列的隐藏用样式实现
        if (e.Row.RowIndex >= 0)
            e.Row.Attributes.Add("onclick", "javascript:__doPostBack('GridView1','Select$" + e.Row.RowIndex + "')");
 }
posted on 2006-06-21 13:39  Ameng  阅读(520)  评论(3)    收藏  举报