cr구매신청 파트목록에서 전체선택/해제 기능 추가

This commit is contained in:
chi
2023-04-19 15:31:19 +09:00
parent 90db05a366
commit 569e059b8a
7 changed files with 332 additions and 199 deletions

View File

@@ -635,14 +635,18 @@ namespace FPJ0000
var selcnt = this.fpSpread1.ActiveSheet.SelectionCount;
var sels = this.fpSpread1.ActiveSheet.GetSelections();
//var sel2 = this.fpSpread1.ActiveSheet.GetSelection(0);
var idxColumn = this.fpSpread1.ActiveSheet.Columns["idx"].Index;
List<int> idxlist = new List<int>();
foreach (var sel in sels)
{
var idx = (int)this.fpSpread1.ActiveSheet.Cells[sel.Row, idxColumn].Value;
if (idx < 0) continue;
idxlist.Add(idx);
for(int r = sel.Row; r< sel.RowCount; r++)
{
var idx = (int)this.fpSpread1.ActiveSheet.Cells[r, idxColumn].Value;
if (idx < 0) continue;
if(idxlist.Contains(idx)==false) idxlist.Add(idx);
}
}
if (idxlist.Any() == false)
@@ -775,5 +779,33 @@ namespace FPJ0000
{
showfolder();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.ClearSelection();
//fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell;
fpSpread1.ActiveSheet.AddSelection(0, 0, fpSpread1.ActiveSheet.RowCount , 1);
var list = fpSpread1.ActiveSheet.GetSelections();
fpSpread1.ActiveSheet.SetActiveCell(0, 0, false);
fpSpread1.ActiveSheet.SetActiveCell(1, 1, false);
fpSpread1.ActiveSheet.SetActiveCell(2, 2, false);
var selected = fpSpread1.ActiveSheet.GetSelections();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.ClearSelection();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}