"ag-grid-angular": "^ 23.1.0", "ag-grid-community": "^ 23.1.0"
을 사용하고 있습니다. 예를 들어 innerHTML과 같은 사용자 지정 데이터를 열에 렌더링하고 싶습니다.
<i class="feather icon-edit-1 "></i>
나는 심지어 ag-grid 문서에서 검색했지만 해결책을 찾을 수 없었습니다.
HTML을 렌더링하려면 cellRenderer
ag-grid의 속성 을 사용해야 합니다. 이 솔루션은 저에게 가장 잘 작동합니다.
customActions = function () {
return '<span><a routerLink="/apps/your-path"><i class="users-edit-icon feather icon-edit-1 mr-50"></i></a><i class="users-delete-icon feather icon-trash-2"></i></span>';
};
// ag-Grid column defination
public columnDefs = [
{
headerName: 'Actions',
cellRenderer: this.customActions
}
];
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다