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