diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index 1bbe96fc..844fb62a 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -23,6 +23,12 @@ namespace Volian.Controls.Library public partial class VlnFlexGrid : C1.Win.C1FlexGrid.C1FlexGrid { public static GridCopyInfo MyCopyInfo = new GridCopyInfo(); + private Color _DefaultCellBackgroundcolor; + + public Color DefaultCellBackgroundcolor + { + get { return _DefaultCellBackgroundcolor; } + } private Color _DefaultFixedBackgroundColor; public Color DefaultFixedBackgroundColor @@ -609,6 +615,7 @@ namespace Volian.Controls.Library this.Styles.Focus.BackColor = Color.LightCyan; this.HighLight = HighLightEnum.WithFocus; + _DefaultCellBackgroundcolor = this.StyleBackColor; _DefaultFixedBackgroundColor = this.Styles.Fixed.BackColor; this.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Custom; @@ -2479,6 +2486,22 @@ namespace Volian.Controls.Library this.AdjustGridControlSize(); } + public bool AllRowsSelected() + { + int maxrow = Selection.r2; + foreach (CellRange cr in MySelection) + maxrow = Math.Max(maxrow, cr.r2); + return (Selection.r1 == 0 && maxrow == Rows.Count - 1); + } + + public bool AllColumnsSelected() + { + int maxcol = Selection.c2; + foreach (CellRange cr in MySelection) + maxcol = Math.Max(maxcol, cr.c2); + return (Selection.c1 == 0 && maxcol == Cols.Count - 1); + } + public void RemoveSelectedColumn() { string msg = ""; @@ -2486,7 +2509,7 @@ namespace Volian.Controls.Library CellRange saveCR = Selection; this.SelectionMode = SelectionModeEnum.ColumnRange; //this.Select(this.Selection.r1, this.Selection.c1); - this.Select(0,Selection.c1,Rows.Count-1,Selection.c2); + this.Select(0, Selection.c1, Rows.Count - 1, Selection.c2); this.SelectionMode = SelectionModeEnum.Default; if (Selection.c1 != Selection.c2) { @@ -2512,7 +2535,7 @@ namespace Volian.Controls.Library CellRange saveCR = Selection; this.SelectionMode = SelectionModeEnum.RowRange; //this.Select(this.Selection.r1, this.Selection.c1,); - this.Select(Selection.r1,0,Selection.r2,Cols.Count-1); + this.Select(Selection.r1, 0, Selection.r2, Cols.Count - 1); this.SelectionMode = SelectionModeEnum.Default; if (Selection.r1 != Selection.r2) {