React 계층형 그리드 열 선택 개요
The React Hierarchical Grid Column Selection feature in Ignite UI for React offers a simplified and Excel-like way to select and highlight an entire column with a single click. It can be enabled through the columnSelection input. Thanks to the rich API, the feature allows for easy manipulation of the selection state, data extraction from the selected fractions, data analysis operations, and visualizations.
React Hierarchical Grid Column Selection Example
아래 샘플은 세IgrHierarchicalGrid 가지 유형의 열 선택 동작을 보여줍니다. 아래 컬럼 선택 드롭다운을 사용하여 각 선택 모드를 활성화하세요.
* 사진 및 Debut 에는 열 선택이 비활성화되어 있습니다.
Basic Usage
열 선택 기능은 다음으로 활성화할 수 있습니다.columnSelection 입력은 다음을GridSelectionMode 값.
상호 작용
기본 선택 모드는 다음과 같습니다None. 또는Single로 설정Multiple 하면 제시된 모든 열이selectable 즉, 열을 선택하려면 하나의 열을 클릭하면 표시됩니다.selected 열이 선택 불가능하면, 마우스를 올리는 동안 헤더에 선택 스타일이 적용되지 않습니다.
[!Note] The Multi Column Headers feature does not reflect on the
selectableinput. TheColumnGroupComponentisselectable, if at least one of its children has the selection behavior enabled. In addition, the component is marked asselectedif all of itsselectabledescendants areselected.
* 위치 열 그룹 아래에서는 도시 열만 선택할 수 있습니다.
Keyboard Combinations
[!Note] The keyboard combinations are available only when the grid
columnSelectioninput is set tomultiple.
열 선택 기능의 키보드 탐색에는 두 가지 시나리오가 있습니다.
- 다중 열 선택 - 홀딩 Ctrl 키 + 클릭 모든 선택 헤더 셀.
- 범위 열 선택 - 보류 교대 + 클릭 모두 선택합니다. 선택 그 사이에 열이 있습니다.
API Manipulations
그 API 추가 기능을 제공합니다. 비가시적 열을 사용하여 모든 숨겨진 열은 다음과 같이 표시할 수 있습니다.selected 해당 세터.
[!Note] The above statement also applies to the
ColumnGroupComponent, except that when theselectedproperty is changed it changes the state of its descendants.
API 조작에 관한 자세한 내용은 API 참조 섹션에서 확인할 수 있습니다.
Styling
미리 정의된 테마 외에도, 일부 사용 가능한 CSS 속성을 설정하여 그리드를 추가로 맞춤화할 수 있었습니다. 색상을 바꾸고 싶다면, 먼저 그리드에 a를 설정class 해야 합니다:
<IgrHierarchicalGrid className="grid"></IgrHierarchicalGrid>
그런 다음 관련 CSS 속성을 이 클래스로 설정합니다.
.grid {
--ig-grid-row-selected-background: #0062A3;
--ig-grid-row-selected-text-color: #ecaa53;
--ig-grid-row-selected-hover-background: #0062A3;
--ig-grid-header-selected-text-color: #ecaa53;
--ig-grid-header-selected-background: #0062A3;
--ig-grid-row-selected-hover-text-color: #ecaa53;
--ig-grid-row-selected-hover-background: #0062A3;
}
Demo
API References
열 선택 UI에는 아래에 나열된 몇 가지 API가 더 있습니다.
IgrHierarchicalGrid properties:
IgrColumn properties:
columnGroup properties:
IgrHierarchicalGrid events:
OnColumnsSelectionChange
Additional Resources
우리 커뮤니티는 활동적이며 항상 새로운 아이디어를 환영합니다.