protected void grv_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if(e.Row.RowType==DataControlRowType.DataRow)

        {
            string id= grv.DataKeys[e.Row.RowIndex].Value.ToString();
            ImageButton img = (ImageButton)e.Row.FindControl("img");
            img.Attributes.Add("onmouseover", "showPanel(" + id + ")");
            img.Attributes.Add("onmouseout", "hidePanel(" + id + ")");
         
        }
        

    }

 

 

 

protected void grv_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        string str = ((TextBox)grv.Rows[e.RowIndex].FindControl("type")).Text.ToString();
        string id = grv.DataKeys[e.RowIndex].Value.ToString();
        bnews.updateNewsType(str, id);
        grv.EditIndex = -1;
        grvBind();
        JS.Alert(Page, "新闻类型更新成功!");
    }

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2022-01-09
  • 2021-11-04
  • 2022-03-04
  • 2021-06-10
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2022-02-20
  • 2021-11-16
  • 2022-12-23
  • 2021-07-05
  • 2022-02-10
相关资源
相似解决方案