이 컨트롤은 더 이상 사용되지 않고 그리드 구성 요소로 대체되었으므로 해당 컨트롤로 마이그레이션하는 것이 좋습니다. 새로운 기능은 제공되지 않으며 버그 수정은 우선순위에서 제외됩니다. 코드베이스를 Data Grid로 마이그레이션하는 데 도움이 필요하거나 질문이 있으면 지원팀에 문의하세요.

    Web Components 로컬 데이터 바인딩

    다음 샘플은 데이터 배열에 대한 Ignite UI for Web Components 데이터 테이블/데이터 그리드 데이터 바인딩을 보여줍니다.

    Web Components 로컬 데이터 바인딩 예제

    EXAMPLE
    TS
    HTML
    CSS

    이 샘플이 마음에 드시나요? 당사의 완전한 Ignite UI for Web Components 툴킷에 액세스하여 몇 분 만에 나만의 앱을 빌드하기 시작하세요. 무료로 다운로드하세요.

    코드 조각

    public data: any[];
    public initData() {
            const names: string[] = [
                "Intel CPU", "AMD CPU",
                "Intel Motherboard", "AMD Motherboard", "Nvidia Motherboard",
                "Nvidia GPU", "Gigabyte GPU", "Asus GPU", "AMD GPU", "MSI GPU",
                "Corsair Memory", "Patriot Memory", "Skill Memory",
                "Samsung HDD", "WD HDD", "Seagate HDD", "Intel HDD", "Asus HDD",
                "Samsung SSD", "WD SSD", "Seagate SSD", "Intel SSD", "Asus SSD",
                "Samsung Monitor", "Asus Monitor", "LG Monitor", "HP Monitor" ];
    
            const countries: string[] = ["USA", "UK", "France", "Canada", "Poland",
                "Denmark", "Croatia", "Australia", "Seychelles",
                "Sweden", "Germany", "Japan", "Ireland",
                "Barbados", "Jamaica", "Cuba", "Spain",];
            const status: string[] = [ "Packing", "Shipped", "Delivered"]
            const sales: any[] = [];
    
            for (let i = 0; i < 200; i++) {
                const price = this.getRandomNumber(10000, 90000) / 100;
                const items = this.getRandomNumber(4, 30);
                const value = Math.round(price * items);
                const margin = this.getRandomNumber(2, 5);
                const profit = Math.round((price * margin / 100) * items);
                const country = this.getRandomItem(countries);
                sales.push({
                    Country: country,
                    CountryFlag: this.getCountryFlag(country),
                    Margin: margin,
                    OrderDate: this.getRandomDate(),
                    OrderItems: items,
                    OrderValue: value,
                    ProductID: 1001 + i,
                    ProductName: this.getRandomItem(names),
                    ProductPrice: price,
                    Profit: Math.round(profit),
                    Status: this.getRandomItem(status),
                });
            }
    
            this.data = sales;
        }
    ts
    Ignite UI for Web Components | CTA 배너

    API 참조