protected void DetailsView1_ItemCommand(object sender, DetailsViewCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
DetailsView1.ChangeMode(DetailsViewMode.Edit);
CommandField dd = new CommandField();
dd.EditText = "Edit";
dd.UpdateText = "Update";
dd.CancelText = "Cancel";
DetailsView1.AutoGenerateEditButton = true;
}
if (e.CommandName == "Cancel")
{
DetailsView1.AutoGenerateEditButton = false;
}
}
protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
{
DetailsView1.AutoGenerateEditButton = false;
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
DetailsView1.Visible = false;
}