! 제품 버전을 정확하게 입력해 주세요.
제품 버전이 정확하게 기재되어 있지 않은 경우,
최신 버전을 기준으로 안내 드리므로
더욱 빠르고 명확한 안내를 위해
제품 버전을 정확하게 입력해 주세요!

그리드 그룹 질문드립니다. > Q&A | 토론

본문 바로가기

Wijmo

Q&A | 토론

VueJS 그리드 그룹 질문드립니다.

페이지 정보

작성자 헌집주인 작성일 2022-04-11 19:57 조회 1,215회 댓글 0건
제품 버전 : 5.20213.834
컨트롤 이름 : 그리드 그룹

본문

안녕하세요, 그리드 그룹 질문드립니다.


https://demo.grapecity.co.kr/wijmo/learn-wijmo/Grid/Grouping/GroupPanelContextMenu/vue

위 주소에서 다음의 소스로 테스트를 했습니다.

그리드 로딩 시 그룹이 닫혀있게 하려면 어떻게 하면 되는지요?


<template>
    <div class="container-fluid">

        <wj-flex-grid
            :itemsSource="data"
            :initialized="initializedGrid">
        </wj-flex-grid>

    </div>
</template>

<script>
import "@grapecity/wijmo.styles/wijmo.css";
import "bootstrap.css";
import Vue from "vue";
import '@grapecity/wijmo.touch'// support drag/drop on touch devices
import "@grapecity/wijmo.vue2.grid";
import "@grapecity/wijmo.vue2.grid.filter";
import { CollectionViewPropertyGroupDescriptionSortDescription } from "@grapecity/wijmo";
import "@grapecity/wijmo.vue2.grid.grouppanel";
import "@grapecity/wijmo.vue2.input"// for the menu

let App = Vue.extend({
    name: "app",
    data: function() {
        return {
            data: new CollectionView(this.getData(), {
                groupDescriptions: ['country']
            }),
            grid: null,
            groupIndex: -1,
        };
    },
    methods: {

        // save references to the controls
        initializedGrid: function(grid) {
            this.grid = grid;
        },

        // create some random data
        getData: function() {
            let countries = "US,Germany,UK,Japan,Italy,Greece".split(","),
                products = "Phones,Computers,Cameras,Stereos".split(","),
                data = [];
            for (let i = 0; i < 200; i++) {
                data.push({
                    id: i,
                    country: countries[i % countries.length],
                    product: products[i % products.length],
                    downloads: Math.round(100 + Math.random() * 10000),
                    sales: Math.random() * 10000,
                    expenses: Math.random() * 5000
                });
            }
            return data;
        }
    }
});

new Vue({ render: h => h(App) }).$mount("#app");
</script>

<style>
    .wj-flexgrid {
        max-height: 250px;
        margin: 10px 0;
    }

    .wj-dropdown-panel.ctx-menu {
        background: rgb(221250255);
        padding: 1em;
    }

    .wj-dropdown-panel.ctx-menu span {
        margin-right: 0.5em;
        opacity: 0.5;
    }

    body {
        margin-bottom: 20px;
    }
</style>
  • 페이스북으로 공유
  • 트위터로  공유
  • 링크 복사
  • 카카오톡으로 보내기

댓글목록

등록된 댓글이 없습니다.

1 답변

VueJS Re: 그리드 그룹 질문드립니다.

추천0 이 글을 추천하셨습니다 비추천0 채택채택

페이지 정보

작성자 GCK루시 작성일 2022-04-12 11:26 댓글 0건

본문

안녕하세요 그레이프시티입니다.


문의 주신 그리드 초기 로드 시, 그룹이 collapse된 상태로 설정하는 방법에 대해 안내 드립니다. 기능 구현을 위해 initialized 이벤트 내에서 모든 그룹 행을 지정된 레벨로 축소시키는 collapseGroupsToLevel 메서드의 레벨을 0으로 설정하시면 되십니다. 아래 코드를 참고하여 주시기 바랍니다.

<wj-flex-grid :itemsSource="data" :initialized="initializedGrid">
</wj-flex-grid>
(...)
initializedGrid: function (grid) {
      this.grid = grid;
      this.grid.collapseGroupsToLevel(0);
},


- collapseGroupsToLevel : https://demo.grapecity.co.kr/wijmo/api/classes/wijmo_grid.flexgrid.html#collapsegroupstolevel


다른 궁금한 점이 생기면, 문의 주시기 바랍니다. 


감사합니다. 

그레이프시티 드림 


* 그레이프시티(GrapeCity)는 개발자를 위하여 ComponentOne(컴포넌트원), Spread(스프레드), ActiveReports(액티브리포츠), SpreadJS(스프레드JS), Wijmo(위즈모)와 같은 엑셀 스프레드시트 리포팅 그리드와 차트 등 다양한 종류의 .NET JavaScript(자바스크립트) 컴포넌트 툴을 생산하고있는 개발툴 전문 회사 입니다.

댓글목록

등록된 댓글이 없습니다.

메시어스 홈페이지를 통해 제품에 대해서 더 자세히 알아 보세요!
홈페이지 바로가기
메시어스 홈페이지를 통해 제품에 대해서 더 자세히 알아 보세요!
홈페이지 바로가기
이메일 : sales-kor@mescius.com | 전화 : 1670-0583 | 경기도 과천시 과천대로 7길 33, 디테크타워 B동 1107호 메시어스(주) 대표자 : 허경명 | 사업자등록번호 : 123-84-00981 | 통신판매업신고번호 : 2013-경기안양-00331 ⓒ 2024 MESCIUS inc. All rights reserved.