From ca6c3eab3955e28d822f1606cb74e61e331792d8 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 16 May 2011 18:54:24 +0000 Subject: [PATCH] Reset background color of table, if delete was aborted. Also bug fix for B2011-080, removing all rows or all columns will call the Delete function. --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index f2600a00..8de17eda 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1383,7 +1383,10 @@ namespace Volian.Controls.Library //string msgs = stpi.HasChildren ? "Are you sure you want to delete this step and its substeps?" : "Are you sure you want to delete this step?"; DialogResult results = MessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (MyFlexGrid != null) + { MyFlexGrid.Styles.Fixed.BackColor = MyFlexGrid.DefaultFixedBackgroundColor; + MyFlexGrid.StyleBackColor = MyFlexGrid.DefaultCellBackgroundcolor; + } MyEditItem.IdentifyChildren(false); if (results == DialogResult.Yes) MyEditItem.RemoveItem(); @@ -1818,12 +1821,18 @@ namespace Volian.Controls.Library #region Table Grid Delete private void btnTblDgnRemoveRow_Click(object sender, EventArgs e) { - MyFlexGrid.RemoveSelectedRow(); + if (MyFlexGrid.AllRowsSelected()) + btnDelStep_Click(sender, e); + else + MyFlexGrid.RemoveSelectedRow(); } private void btnTblDgnRemoveColumn_Click(object sender, EventArgs e) { - MyFlexGrid.RemoveSelectedColumn(); + if (MyFlexGrid.AllColumnsSelected()) + btnDelStep_Click(sender, e); + else + MyFlexGrid.RemoveSelectedColumn(); } #endregion