WinForms윈폼 스프레드 시트 랜더링 오류 문제
추천0 비추천 0
페이지 정보
작성자 후니후니 작성일 2023-09-20 13:55 조회 236회 댓글 0건제품 버전 : 13.45.20203.0
컨트롤 이름 : FpSpread
본문
첨부파일
관련링크
도구 상자에서 FpSpread 컨트롤을 추가해준 뒤 spread designer 에서 버튼만 추가 해준 뒤 코드 상에서
ComboListPC구분.Items = SP.listPC구분().ToArray(); ComboListMonitor.Items = SP.listMonitor().ToArray(); ComboListOS.Items = SP.listOS().ToArray(); ComboListGrade.Items = SP.listGrade().ToArray(); ComboListYn.Items = SP.listYn().ToArray(); spdData.ActiveSheet.Columns[3].CellType = ComboListPC구분; spdData.ActiveSheet.Columns[9].CellType = ComboListMonitor; // 모니터1 spdData.ActiveSheet.Columns[10].CellType = ComboListMonitor; // 모니터2 spdData.ActiveSheet.Columns[11].CellType = ComboListGrade; // 적정등급 spdData.ActiveSheet.Columns[13].CellType = ComboListOS; // 적정OS spdData.ActiveSheet.Columns[14].CellType = ComboListOS; // 현재OS spdData.ActiveSheet.Columns[15].CellType = ComboListYn; // 오피스 spdData.ActiveSheet.Columns[18].CellType = ComboListYn; // 원격여부 17 spdData.ActiveSheet.Columns[19].CellType = ComboListYn; // 보고용 18 spdData.ActiveSheet.Columns[21].CellType = new CheckBoxCellType();
다음과 같이 셀 타입을 지정해주었습니다.
그 뒤 스프레드의 레코드 초기화를 해줄 때에 다음과 같이 컬럼을 돌면서 value 값들을 ""로 초기화 해주니 추가해준 콤보박스와 단추들의 랜더링이 안보이는 현상이 발생했습니다.
for (col = 1; col < spd.ColumnCount - 2; col++) { spd.Cells[0, 4, 0, 7].Value = null; // null로 초기화 하는 것은 문제 없이 잘 되었음 spd.Cells[e.Row, col].Text = ""; // text 속성 초기화도 정상 동작 spd.Cells[e.Row, 4, 0, 7].Value = ""; // value 값을 ""로 초기화 했을 때만 랜더링 오류가 발생 }
여기서 말하는 랜더링 오류는 프로그램을 실행하고 저 구문이 실행되었을 때 위에서 지정했던 CellType들이 보이지 않는 현상입니다.
하지만 마우스를 해당 셀에 오버하였을 때는 속성이 보이고 동작은 되는 상황입니다.
물론 초기화를 하는 다른 방법이 있겠지만 이렇게 진행을 하다 알게되어서 어느 부분이 문제가 되어 랜더링 오류가 발생하는지 알고 싶어 질문 드립니다.
첨부한 사진과 같이 구문이 동작한 뒤 셀타입 랜더링이 사라지는 현상을 확인하였습니다.
첨부한 사진과 같이 구문이 동작한 뒤 셀타입 랜더링이 사라지는 현상을 확인하였습니다.
댓글목록
등록된 댓글이 없습니다.