Bug fix for B2011-080, added a check for all rows or all columns selected. Added variable to save background color, so that it could be restored if a Delete was aborted.
This commit is contained in:
parent
ca6c3eab39
commit
5222423ac4
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user