protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "editkey")
            {
                string OrderId = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
                GridView1.Visible = false;               
            }
            else if(e.CommandName=="del")
             {

            }
        }
注意:editkey只能是  <asp:ButtonField>,如果是<asp:TemplateField>就会出错

相关文章:

  • 2021-06-13
  • 2021-08-19
  • 2021-07-18
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-02-09
  • 2021-10-15
  • 2021-11-27
相关资源
相似解决方案