This commit is contained in:
parent
dde998479b
commit
81b22109e6
@ -2144,68 +2144,68 @@ namespace Volian.Controls.Library
|
|||||||
Select(saveCR);
|
Select(saveCR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveRows(int strow, int stcol, int cnt)
|
private void RemoveRows(int strow, int stcol, int cnt)
|
||||||
{
|
{
|
||||||
bool mergedRow = false;
|
bool mergedRow = false;
|
||||||
for (int i = 0; i < cnt; i++)
|
for (int i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
//if (this.RowIsInMergeRange(strow))
|
//if (this.RowIsInMergeRange(strow))
|
||||||
//{
|
//{
|
||||||
for (int cl = 0; cl < this.Cols.Count && !mergedRow; cl++)
|
for (int cl = 0; cl < this.Cols.Count && !mergedRow; cl++)
|
||||||
{
|
{
|
||||||
int idx = this.MergedRanges.IndexOf(strow, cl);
|
int idx = this.MergedRanges.IndexOf(strow, cl);
|
||||||
if (idx > -1)
|
if (idx > -1)
|
||||||
{
|
{
|
||||||
CellRange cr = this.MergedRanges[idx];
|
CellRange cr = this.MergedRanges[idx];
|
||||||
if (cr.r1 < cr.r2)
|
if (cr.r1 < cr.r2)
|
||||||
mergedRow = true;
|
mergedRow = true;
|
||||||
//this[cr.r1 + 1, cr.c1] = this[cr.r1, cr.c1];
|
//this[cr.r1 + 1, cr.c1] = this[cr.r1, cr.c1];
|
||||||
}
|
}
|
||||||
cl++;
|
cl++;
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
this.Rows.Remove(strow);
|
this.Rows.Remove(strow);
|
||||||
this.AdjustMergedRows(strow, false, true);
|
this.AdjustMergedRows(strow, false, true);
|
||||||
if (mergedRow)
|
//if (mergedRow)
|
||||||
{
|
//{
|
||||||
cnt++;
|
//cnt++;
|
||||||
mergedRow = false;
|
mergedRow = false;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
MyBorders.DeleteRows(strow, cnt);
|
MyBorders.DeleteRows(strow, cnt);
|
||||||
this.AdjustGridControlSize();
|
this.AdjustGridControlSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RemoveColumns(int strow, int stcol, int cnt)
|
private void RemoveColumns(int strow, int stcol, int cnt)
|
||||||
{
|
{
|
||||||
bool mergedCol = false;
|
bool mergedCol = false;
|
||||||
for (int i = 0; i < cnt; i++)
|
for (int i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
//if (this.ColIsInMergeRange(stcol))
|
//if (this.ColIsInMergeRange(stcol))
|
||||||
//{
|
//{
|
||||||
for (int rw = 0; rw < this.Rows.Count && !mergedCol; rw++)
|
for (int rw = 0; rw < this.Rows.Count && !mergedCol; rw++)
|
||||||
{
|
{
|
||||||
int idx = this.MergedRanges.IndexOf(rw, stcol);
|
int idx = this.MergedRanges.IndexOf(rw, stcol);
|
||||||
if (idx > -1)
|
if (idx > -1)
|
||||||
{
|
{
|
||||||
CellRange cr = this.MergedRanges[idx];
|
CellRange cr = this.MergedRanges[idx];
|
||||||
if (cr.c1 < cr.c2)
|
if (cr.c1 < cr.c2)
|
||||||
mergedCol = true;
|
mergedCol = true;
|
||||||
//this[cr.r1, cr.c1 + 1] = this[cr.r1, cr.c1];
|
//this[cr.r1, cr.c1 + 1] = this[cr.r1, cr.c1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
this.Cols.Remove(stcol);
|
this.Cols.Remove(stcol);
|
||||||
this.AdjustMergedColumns(stcol, false, true);
|
this.AdjustMergedColumns(stcol, false, true);
|
||||||
if (mergedCol)
|
//if (mergedCol)
|
||||||
{
|
//{
|
||||||
cnt++;
|
// //cnt++;
|
||||||
mergedCol = false;
|
mergedCol = false;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
MyBorders.DeleteColumns(stcol, cnt);
|
MyBorders.DeleteColumns(stcol, cnt);
|
||||||
this.AdjustGridControlSize();
|
this.AdjustGridControlSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveSelectedCells()
|
public void RemoveSelectedCells()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user