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>就会出错