! 제품 버전을 정확하게 입력해 주세요.
제품 버전이 정확하게 기재되어 있지 않은 경우,
최신 버전을 기준으로 안내 드리므로
더욱 빠르고 명확한 안내를 위해
제품 버전을 정확하게 입력해 주세요!

FlexGrid Footer Aggregates Format 변경 또는 Round 반올림 표시 방법 > Q&A | 토론

본문 바로가기

ComponentOne

Q&A | 토론

WinForms윈폼 FlexGrid Footer Aggregates Format 변경 또는 Round 반올림 표시 방법

페이지 정보

작성자 벌치기 작성일 2023-08-17 14:36 조회 173회 댓글 0건
제품 버전 : ComponentOne 4.5.2
컨트롤 이름 : C1FlexGrid

본문

C1FlexGrid 의 Footer Aggregates 항목을 평균/최대/최소/합계를 추가했고, 

아래와 같이 값이 잘 표시되고 있습니다.

2가지 질문이 있습니다.

1. 셀별로 Format 을 적용하려고 했으니, 작동하지 않습니다.

C1FlexGrid.Cols[1].Format = "#,000.00";


2. Footer 에 표시되는 값을 소수점 3자리 까지만 표시할 수 있는 방법.

Format, Round, Expression 등 사용방법



Footer 는 아래와 같은 방법으로 추가했습니다.


            #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

  • 페이스북으로 공유
  • 트위터로  공유
  • 링크 복사
  • 카카오톡으로 보내기

댓글목록

등록된 댓글이 없습니다.

1 답변

WinForms윈폼 Re: FlexGrid Footer Aggregates Format 변경 또는 Round 반올림 표시 방법

추천1 이 글을 추천하셨습니다 비추천0 채택채택

페이지 정보

작성자 GCK싸이먼 작성일 2023-08-18 20:06 댓글 1건

본문

첨부파일

안녕하세요 그레이프시티 입니다.


1. 안타깝게도 Format을 적용하는 것은 일반 셀에서만 적용가능하며, 

Footer의 셀에서는 적용되지 않습니다.

이는 푸터 셀에 표시된 텍스트가 이미 문자열로 형식이 지정되어 추가적으로 사용자 지정 형식을 적용할 수 없기 때문입니다.


2. Footer의 셀에서 소수점 이하 3자리까지만 표기하려면 AggregateDefinition.Caption 속성에서 "N3" 형식을 정의할 수 있습니다.


샘플 프로젝트를 첨부드리오니, 첨부된 프로젝트를 참고하여주시기 바랍니다.


추가적으로 궁금하신 사항은 문의해 주시기 바랍니다.

감사합니다.

그레이프시티 드림.


댓글목록

벌치기님의 댓글

벌치기 작성일

답변이 도움되었습니다. 감사합니다.

메시어스 홈페이지를 통해 제품에 대해서 더 자세히 알아 보세요!
홈페이지 바로가기
메시어스 홈페이지를 통해 제품에 대해서 더 자세히 알아 보세요!
홈페이지 바로가기
이메일 : sales-kor@mescius.com | 전화 : 1670-0583 | 경기도 과천시 과천대로 7길 33, 디테크타워 B동 1107호 메시어스(주) 대표자 : 허경명 | 사업자등록번호 : 123-84-00981 | 통신판매업신고번호 : 2013-경기안양-00331 ⓒ 2024 MESCIUS inc. All rights reserved.