2017-05-10 249 views
2

나는 Ag-grid를 사용하고 있으며 특정 셀을 연속으로 병합해야하므로이를 달성하는 데 도움을주십시오.Ag-grid 셀을 병합하려면 어떻게해야합니까?

미리 감사드립니다 ...!

+0

ag-grid에는 고유 한 것이 없지만이 gihub 문제에는 몇 가지 세부 정보/해결 방법이 있습니다. https://github.com/ceolter/ag-grid/issues/22 –

답변

0

ag-Grid에서이 "열 확장"을 호출합니다. HTML 테이블을 작성하는 좋은 날에는 셀을 수직으로 병합하는 밀접한 관련 작업을 위해 colspanrowspan을 호출합니다.

어쨌든

, 여기에 AG-그리드 참조입니다 :

https://www.ag-grid.com/javascript-grid-column-spanning/

0
당신은 특정 열

cellClass: function(params) { 
    if(params.data.someConditionForCellsToBeMerged) { 
     return params.data.someConditionForCellToKeep ? "top-row-span": "bottom-row-span"; 
    } 
} 

다음 CSS에 대한 colDef이를 추가 할 수 있습니다

:

.ag-neo .ag-cell.top-row-span { 
    border-bottom: 0px; 
} 

.ag-neo .ag-cell.bottom-row-span { 
    border-top: 0px; 
    text-indent: -100em; // you can use this to hide the content of the bottom cell 
}