WinForms윈폼 FlexGrid Footer Aggregates Format 변경 또는 Round 반올림 표시 방법
페이지 정보
작성자 벌치기 작성일 2023-08-17 14:36 조회 173회 댓글 0건본문
관련링크
C1FlexGrid 의 Footer Aggregates 항목을 평균/최대/최소/합계를 추가했고,
아래와 같이 값이 잘 표시되고 있습니다.
2가지 질문이 있습니다.
1. 셀별로 Format 을 적용하려고 했으니, 작동하지 않습니다.
C1FlexGrid.Cols[1].Format = "#,000.00";
2. Footer 에 표시되는 값을 소수점 3자리 까지만 표시할 수 있는 방법.
Format, Round, Expression 등 사용방법
#region "Footer Setting"
c1FlexGrid1.Footers.Fixed = true;
c1FlexGrid1.Footers.Descriptions.Add(new C1.Win.C1FlexGrid.FooterDescription() { Caption = "평 균" });
c1FlexGrid1.Footers.Descriptions.Add(new C1.Win.C1FlexGrid.FooterDescription() { Caption = "최대값" });
c1FlexGrid1.Footers.Descriptions.Add(new C1.Win.C1FlexGrid.FooterDescription() { Caption = "최소값" });
c1FlexGrid1.Footers.Descriptions.Add(new C1.Win.C1FlexGrid.FooterDescription() { Caption = "합 계" });
for (int i = 1; i < 53; i++)
{
c1FlexGrid1.Footers.Descriptions[0].Aggregates.Add(new C1.Win.C1FlexGrid.AggregateDefinition() { Column = i, Aggregate = C1.Win.C1FlexGrid.AggregateEnum.Average});
c1FlexGrid1.Footers.Descriptions[1].Aggregates.Add(new C1.Win.C1FlexGrid.AggregateDefinition() { Column = i, Aggregate = C1.Win.C1FlexGrid.AggregateEnum.Max});
c1FlexGrid1.Footers.Descriptions[2].Aggregates.Add(new C1.Win.C1FlexGrid.AggregateDefinition() { Column = i, Aggregate = C1.Win.C1FlexGrid.AggregateEnum.Min});
c1FlexGrid1.Footers.Descriptions[3].Aggregates.Add(new C1.Win.C1FlexGrid.AggregateDefinition() { Column = i, Aggregate = C1.Win.C1FlexGrid.AggregateEnum.Sum});
c1FlexGrid1.Footers.Descriptions[0].Aggregates[i - 1].Aggregate = AggregateEnum.Average;
c1FlexGrid1.Footers.Descriptions[1].Aggregates[i - 1].Aggregate = AggregateEnum.Max;
c1FlexGrid1.Footers.Descriptions[2].Aggregates[i - 1].Aggregate = AggregateEnum.Min;
c1FlexGrid1.Footers.Descriptions[3].Aggregates[i - 1].Aggregate = AggregateEnum.Sum;
}
#endregion
댓글목록
등록된 댓글이 없습니다.