React Tree Grid 열 선택 개요

    Ignite UI for React의 React 트리 그리드 컬럼 선택 기능은 한 번의 클릭으로 전체 칼럼을 선택하고 하이라이트할 수 있는 단순화되고 엑셀과 유사한 방식을 제공합니다. 입력을columnSelection 통해 활성화할 수 있습니다. 풍부한 API 덕분에 선택 상태 조작, 선택된 분수에서 데이터 추출, 데이터 분석 작업 및 시각화가 용이합니다.

    React Tree Grid Column Selection Example

    아래 샘플은 세IgrTreeGrid 가지 유형의 열 선택 동작을 보여줍니다. 아래 컬럼 선택 드롭다운을 사용하여 각 선택 모드를 활성화하세요.

    * 단가(Unit Price)단종(Discontinued)은 열 선택이 비활성화된 상태입니다.

    Basic Usage

    열 선택 기능은 다음으로 활성화할 수 있습니다.columnSelection 입력은 다음을GridSelectionMode 값.

    상호 작용

    기본 선택 모드는 다음과 같습니다None. 또는Single로 설정Multiple 하면 제시된 모든 열이selectable 즉, 열을 선택하려면 하나의 열을 클릭하면 표시됩니다.selected 열이 선택 불가능하면, 마우스를 올리는 동안 헤더에 선택 스타일이 적용되지 않습니다.

    [!Note] The Multi Column Headers feature does not reflect on the selectable input. The ColumnGroupComponent is selectable, if at least one of its children has the selection behavior enabled. In addition, the component is marked as selected if all of its selectable descendants are selected.

    * 개인 세부정보 열 그룹에서는 열 ID제목만 선택할 수 있습니다.

    Keyboard Combinations

    [!Note] The keyboard combinations are available only when the grid columnSelection input is set to multiple.

    열 선택 기능의 키보드 탐색에는 두 가지 시나리오가 있습니다.

    • 다중 열 선택 - 홀딩 Ctrl 키 + 클릭 모든 선택 헤더 셀.
    • 범위 열 선택 - 보류 교대 + 클릭 모두 선택합니다. 선택 그 사이에 열이 있습니다.

    API Manipulations

    API 추가 기능을 제공합니다. 비가시적 열을 사용하여 모든 숨겨진 열은 다음과 같이 표시할 수 있습니다.selected 해당 세터.

    [!Note] The above statement also applies to the ColumnGroupComponent, except that when the selected property is changed it changes the state of its descendants.

    API 조작에 관한 자세한 내용은 API 참조 섹션에서 확인할 수 있습니다.

    Styling

    미리 정의된 테마 외에도, 일부 사용 가능한 CSS 속성을 설정하여 그리드를 추가로 맞춤화할 수 있었습니다. 색상을 바꾸고 싶다면, 먼저 그리드에 a를 설정class 해야 합니다:

    <IgrTreeGrid className="grid"></IgrTreeGrid>
    

    그런 다음 관련 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가 더 있습니다.

    IgrTreeGrid properties:

    IgrColumn properties:

    columnGroup properties:

    IgrTreeGrid events:

    • OnColumnsSelectionChange

    Additional Resources

    우리 커뮤니티는 활동적이며 항상 새로운 아이디어를 환영합니다.