티스토리 뷰
ag-Grid
- 웹 애플리케이션에서 데이터를 표 형식으로 효율적으로 표시하고 관리할 수 있도록 돕는 JavaScript 기반의 고성능 데이터 그리드 라이브러리 aggrid는 모든 주요 웹 프레임워크(React, Angular, Vue.js)와 호환되며, 독립적인 JavaScript 라이브러리로도 사용할 수 있다.
다양한 기능
- 정렬(Sorting)
- 필터링(Filtering)
- 그룹화(Grouping)
- 페이징(Paging)
- 편집(Editing)
- 컬럼 고정(Pinned Columns)
- 드래그 앤 드롭(Drag and Drop)
- 셀 템플릿(Custom Cell Templates)
- 컬럼 숨김/보임(Column Visibility)
ag-Grid 기본 사용법
<!-- HTML에 ag-Grid 스타일과 스크립트 링크 추가 -->
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/styles/ag-grid.css">
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community/styles/ag-theme-alpine.css">
<script src="https://unpkg.com/ag-grid-community/dist/ag-grid-community.min.noStyle.js"></script>
<div id="myGrid" style="height: 400px; width: 600px;" class="ag-theme-alpine"></div>
<script>
const gridOptions = {
columnDefs: [
{ headerName: "Make", field: "make" },
{ headerName: "Model", field: "model" },
{ headerName: "Price", field: "price" }
],
rowData: [
{ make: "Toyota", model: "Celica", price: 35000 },
{ make: "Ford", model: "Mondeo", price: 32000 },
{ make: "Porsche", model: "Boxster", price: 72000 }
]
};
const defaultColDef = {
resizable: false, // 컬럼 크기 조정 기능 비활성화
sortable: false, // 정렬 비활성화
suppressMovable: true, // 행, 컬럼의 이동을 제한
};
// 그리드 초기화
new agGrid.Grid(document.getElementById('myGrid'), gridOptions);
</script>
공식 문서 : https://www.ag-grid.com/react-data-grid/getting-started/
React Grid: Quick Start | AG Grid
Build a React Table with AG Grid, the best free, fast and flexible React Data Grid. Features Sorting, Filtering, Pagination, Custom Components, and more. Download AG Grid v32.3.0 today: The best React Table & React Data Grid in the world.
www.ag-grid.com
'JavaScript' 카테고리의 다른 글
[JS] HTTP 상태 코드 (0) | 2024.10.10 |
---|---|
[JS] exceljs 사용하여 JS데이터를 엑셀 파일로 추출 (0) | 2024.08.14 |
[JS] 일급객체와 고차함수 (0) | 2024.08.12 |
[JS] 고차 함수 (Higher-Order Function) (0) | 2024.08.01 |
[JS] 유사배열 (0) | 2024.08.01 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 운영체제
- 운영체제 유형
- 자료처리시스템
- Java
- 범용리스트
- 콜백 큐
- 네트워크
- 온라인처리
- 스코프
- 프로그래머스
- startsWith()
- replaceAll
- 호이스팅
- 대소문자 변환
- 구성형태
- SQLD
- 블록스코프
- 중첩스코프
- fsd 아키텍처
- 자료구조
- StringBuilder
- Replace
- 컴퓨터 시스템 구성요소
- SQL 개발자
- 접속형태
- fsd 구조
- 운영체제 특징
- useeffet
- 엑셀 파일 추출
- 네트워크 접속장치
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함