Skip to content

Commit d5a10c6

Browse files
authored
Merge pull request #3185 from IgniteUI/image-column
feat(image column): updating column datatypes sample
2 parents f0c7dd0 + 3cba2a5 commit d5a10c6

11 files changed

Lines changed: 12 additions & 4 deletions

src/app/grid/grid-column-data-types-sample/grid-column-data-types-sample.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
<igx-column field="ProductName" [width]="'120px'" header="Prod. Name" [sortable]="true" [hasSummary]="true"
8383
[editable]="true" [dataType]="'string'" [resizable]="true">
8484
</igx-column>
85+
<igx-column field="ProductImage" [width]="'60px'" header="Image" [dataType]="'image'" [resizable]="true">
86+
</igx-column>
8587
<igx-column field="UnitPrice" [width]="'100px'" header="Unit Price" [sortable]="true" [hasSummary]="true" [editable]="true"
8688
[pipeArgs]="formatOptions" [dataType]="'number'" [resizable]="true">
8789
</igx-column>

src/app/grid/grid-column-data-types-sample/grid-column-data-types-sample.component.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
/*eslint-disable*/
2-
import { Component, OnInit, ViewChild } from "@angular/core";
2+
import { Component, OnInit } from "@angular/core";
33
import { registerLocaleData} from "@angular/common";
44
import localeBG from '@angular/common/locales/bg';
55
import localeDE from '@angular/common/locales/de';
66
import localeFR from '@angular/common/locales/fr';
77
import localeJA from '@angular/common/locales/ja';
8-
import { IgxGridComponent } from "igniteui-angular";
98

109
@Component({
1110
selector: "grid-column-data-types-sample",
1211
styleUrls: ["./grid-column-data-types-sample.component.scss"],
1312
templateUrl: "grid-column-data-types-sample.component.html"
1413
})
1514
export class GridColumnDataTypesSampleComponent implements OnInit {
16-
@ViewChild("grid1", { read: IgxGridComponent, static: true })
17-
public grid1: IgxGridComponent;
1815

1916
public digitsInfoMessage: string = 'Applicable to number, currency and percent type columns';
2017

@@ -85,6 +82,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
8582
SupplierID: 1,
8683
CategoryID: 1,
8784
QuantityPerUnit: "10 boxes x 20 bags",
85+
ProductImage: "/assets/images/products/chai.jpg",
8886
UnitPrice: 18.0000,
8987
UnitsInStock: 39,
9088
UnitsOnOrder: 0.030,
@@ -96,6 +94,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
9694
}, {
9795
ProductID: 2,
9896
ProductName: "Chang",
97+
ProductImage: "/assets/images/products/chang.jpg",
9998
SupplierID: 1,
10099
CategoryID: 1,
101100
QuantityPerUnit: "24 - 12 oz bottles",
@@ -110,6 +109,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
110109
}, {
111110
ProductID: 3,
112111
ProductName: "Aniseed Syrup",
112+
ProductImage: "/assets/images/products/aniseed.jpg",
113113
SupplierID: 1,
114114
CategoryID: 2,
115115
QuantityPerUnit: "12 - 550 ml bottles",
@@ -124,6 +124,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
124124
}, {
125125
ProductID: 4,
126126
ProductName: "Chef Antons Cajun Seasoning",
127+
ProductImage: "/assets/images/products/cajun-seasoning.jpg",
127128
SupplierID: 2,
128129
CategoryID: 2,
129130
QuantityPerUnit: "48 - 6 oz jars",
@@ -138,6 +139,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
138139
}, {
139140
ProductID: 5,
140141
ProductName: "Chef Antons Gumbo Mix",
142+
ProductImage: "/assets/images/products/chef-antons-gumbo-mix.jpg",
141143
SupplierID: 2,
142144
CategoryID: 2,
143145
QuantityPerUnit: "36 boxes",
@@ -152,6 +154,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
152154
}, {
153155
ProductID: 6,
154156
ProductName: "Grandmas Boysenberry Spread",
157+
ProductImage: "/assets/images/products/grandmas-boysenberry-spread.jpg",
155158
SupplierID: 3,
156159
CategoryID: 2,
157160
QuantityPerUnit: "12 - 8 oz jars",
@@ -166,6 +169,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
166169
}, {
167170
ProductID: 7,
168171
ProductName: "Uncle Bobs Organic Dried Pears",
172+
ProductImage: "/assets/images/products/uncle-bobs-organic-dried-pears.jpg",
169173
SupplierID: 3,
170174
CategoryID: 7,
171175
QuantityPerUnit: "12 - 1 lb pkgs.",
@@ -180,6 +184,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
180184
}, {
181185
ProductID: 8,
182186
ProductName: "Northwoods Cranberry Sauce",
187+
ProductImage: "/assets/images/products/cranberry-sauce.jpg",
183188
SupplierID: 3,
184189
CategoryID: 2,
185190
QuantityPerUnit: "12 - 12 oz jars",
@@ -194,6 +199,7 @@ export class GridColumnDataTypesSampleComponent implements OnInit {
194199
}, {
195200
ProductID: 9,
196201
ProductName: "Mishi Kobe Niku",
202+
ProductImage: "/assets/images/products/mishi-kobe-niku.jpg",
197203
SupplierID: 4,
198204
CategoryID: 6,
199205
QuantityPerUnit: "18 - 500 g pkgs.",
754 Bytes
Loading
732 Bytes
Loading
724 Bytes
Loading
637 Bytes
Loading
774 Bytes
Loading
736 Bytes
Loading
730 Bytes
Loading
615 Bytes
Loading

0 commit comments

Comments
 (0)