//bool IsInEditMode() //{ // return (AutonumListOut.Count == 0 // || PackBLL.GetInitPack4Combine(AutonumListOut[0]) != null); //} void LoadPack() { GridViewPackIn.DataBind(); GridViewPackOut.DataBind(); //Load GUI btnOk.Enabled = IsEditMode; foreach (DataControlField item in GridViewPackIn.Columns) { if (item is CommandField) { (item as CommandField).ShowDeleteButton = IsEditMode; } } }
protected void GridViewPackIn_RowDeleting(object sender, GridViewDeleteEventArgs e) { AutonumListIn.Remove((int)e.Keys[0]); GridViewPackIn.DataBind(); e.Cancel = true; }