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 + "')");
}
{
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 + "')");
}
浙公网安备 33010602011771号