Web Components Grid セル編集
Web Components Grid の Ignite UI for Web Components セル編集機能は、Web Components Grid コンポーネント内の個々のセルのコンテンツの優れたデータ操作機能を提供し、React CRUD 操作用の強力な API を備えています。これはスプレッドシート、データ テーブル、データ グリッドなどのアプリの基本的な機能であり、ユーザーが特定のセル内のデータを追加、編集、更新できるようにします。 デフォルトでは、Ignite UI for Web Components の Grid がセル編集に使用されます。また、デフォルトのセル編集テンプレートにより、列のデータ型 「Top of Form」 に基づいて異なるエディターが存在します。
さらに、データ更新アクション用の独自のカスタム テンプレートを定義したり、変更をコミット/破棄したりするためのデフォルトの動作をオーバーライドすることもできます。
Web Components Grid セル編集と編集テンプレートの例
import 'igniteui-webcomponents-grids/grids/combined';
import { ComponentRenderer, WebGridDescriptionModule, WebPaginatorDescriptionModule } from 'igniteui-webcomponents-core';
import { IgcGridComponent } from 'igniteui-webcomponents-grids/grids';
import NwindData from './NwindData.json';
import "igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
import "./index.css";
export class Sample {
private grid: IgcGridComponent
private _bind: () => void;
constructor() {
var grid = this.grid = document.getElementById('grid') as IgcGridComponent;
this._bind = () => {
grid.data = this.nwindData;
}
this._bind();
}
private _nwindData: any[] = NwindData;
public get nwindData(): any[] {
return this._nwindData;
}
private _componentRenderer: ComponentRenderer = null;
public get renderer(): ComponentRenderer {
if (this._componentRenderer == null) {
this._componentRenderer = new ComponentRenderer();
var context = this._componentRenderer.context;
WebGridDescriptionModule.register(context);
WebPaginatorDescriptionModule.register(context);
}
return this._componentRenderer;
}
}
new Sample();
ts<!DOCTYPE html>
<html>
<head>
<title>Sample | Ignite UI | Web Components | infragistics</title>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
<link rel="stylesheet" href="/src/index.css" type="text/css" />
</head>
<body>
<div id="root">
<div class="container sample ig-typography">
<div class="container fill">
<igc-grid
auto-generate="false"
id="grid"
name="grid"
id="grid"
primary-key="ProductID"
allow-filtering="true">
<igc-paginator
per-page="10">
</igc-paginator>
<igc-column
field="ProductName"
header="Product Name"
data-type="string"
sortable="true"
has-summary="true"
editable="true"
resizable="true">
</igc-column>
<igc-column
field="UnitsInStock"
header="Units in Stock"
data-type="number"
sortable="true"
has-summary="true"
editable="true"
resizable="true">
</igc-column>
<igc-column
field="OrderDate"
header="Order Date"
data-type="date"
sortable="true"
has-summary="true"
editable="true"
resizable="true">
</igc-column>
<igc-column
field="Discontinued"
header="Discontinued"
data-type="boolean"
sortable="true"
has-summary="true"
editable="true">
</igc-column>
<igc-column
field="ReorderLevel"
header="Reorder Level"
data-type="number"
sortable="true"
has-summary="true"
editable="true"
filterable="false">
</igc-column>
</igc-grid>
</div>
</div>
</div>
<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
html/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */
#grid {
--ig-size: var(--ig-size-medium);
}
css
このサンプルが気に入りましたか? 完全な Ignite UI for Web Componentsツールキットにアクセスして、すばやく独自のアプリの作成を開始します。無料でダウンロードできます。
セルの編集
UI を介した編集
編集可能なセルがフォーカスされたときに以下のいずれかの方法で特定のセルを編集モードにすることができます。
- ダブル クリック
- シングル クリック - 以前選択したセルが編集モードで現在選択したセルが編集可能な場合のみ、シングル クリックで編集モードに入ります。以前選択したセルが編集モードではない場合、編集モードに入らずにシングル クリックでセルを選択します。
- Enter キーの押下
- F2 キーの押下
変更をコミットしない場合も以下の方法で編集モードを終了できます。
- Escape キーの押下;
- ソート、フィルターリング、検索、非表示操作の実行時。
変更をコミットしない場合も以下の方法で編集モードを終了できます。
- Enter キーの押下
- F2 キーの押下
- Tab キーの押下
- 他のセルをシングル クリック -
IgcGridComponent
で他のセルをクリックしたときに変更がサブミットされます。 - その他の操作 (ページング、サイズ変更、ピン固定、移動など) は、編集モードを終了して変更を送信します。
セルは、垂直/水平方向へのスクロールや IgcGridComponent 以外をクリックした場合も編集モードのままです。セル編集と行編集両方で有効です。
API を介した編集
プライマリキーが定義されている場合のみ IgcGridComponent
API でもセル値を変更することができます。
public updateCell() {
this.grid1.updateCell(newValue, rowID, 'ReorderLevel');
}
typescript
セルを更新するその他の方法として Cell
の update
メソッドで直接更新する方法があります。
public updateCell() {
const cell = this.grid1.getCellByColumn(rowIndex, 'ReorderLevel');
// You can also get cell by rowID if primary key is defined
// cell = this.grid1.getCellByKey(rowID, 'ReorderLevel');
cell.update(70);
}
typescript
セル編集テンプレート
デフォルトのセル編集テンプレートの詳細については、編集トピックを参照してください。
セルに適用されるカスタム テンプレートを提供する場合は、そのテンプレートをセル自体またはそのヘッダーに渡すことができます。まず、通常どおりに列を作成します。
<igc-column
field="Race"
data-type="string"
editable="true"
id="column1">
</igc-column>
html
そして、テンプレートを index.ts ファイルのこの列に渡します。
constructor() {
var grid1 = document.getElementById('grid1') as IgcGridComponent;
var column1 = document.getElementById('column1') as IgcColumnComponent;
var column2 = document.getElementById('column2') as IgcColumnComponent;
var column3 = document.getElementById('column3') as IgcColumnComponent;
grid1.data = this.webGridCellEditSampleRoleplay;
column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
column2.inlineEditorTemplate = this.webGridCellEditCellTemplate;
column3.inlineEditorTemplate = this.webGridCellEditCellTemplate;
}
public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
let cellValues: any = [];
let uniqueValues: any = [];
for(const i of (this.webGridCellEditSampleRoleplay as any)){
const field: string = ctx.cell.column.field;
if(uniqueValues.indexOf(i[field]) === -1 )
{
cellValues.push(html`<igc-select-item value=${i[field]}>${(i[field])}</igc-select-item>`);
uniqueValues.push(i[field]);
}
}
return html`
<igc-select style="width:100%; height:100%" size="large" @igcChange=${(e: any) => ctx.cell.editValue = e.detail.value}>
${cellValues}
</igc-select>
`;
}
typescript
上記のサンプルは、こちらで参照できます。
export class RoleplayDataStatsItem {
public constructor(init: Partial<RoleplayDataStatsItem>) {
Object.assign(this, init);
}
public Name: string;
public Age: string;
public Alignment: string;
public Race: string;
public Class: string;
}
export class RoleplayDataStats extends Array<RoleplayDataStatsItem> {
public constructor(items: Array<RoleplayDataStatsItem> | number = -1) {
if (Array.isArray(items)) {
super(...items);
} else {
const newItems = [
new RoleplayDataStatsItem(
{
Name: `Stredo`,
Age: `244`,
Alignment: `💜 Lawful evil`,
Race: `👩 Human`,
Class: `🎻 Bard`
}),
new RoleplayDataStatsItem(
{
Name: `Haluun`,
Age: `40`,
Alignment: `🤍 Unaligned`,
Race: `🧒🏻 Hafling`,
Class: `🙏🏻 Monk`
}),
new RoleplayDataStatsItem(
{
Name: `Ivellios`,
Age: `244`,
Alignment: `🧡 Chaotic good`,
Race: `👩 Human`,
Class: `⚔️ Paladin`
}),
new RoleplayDataStatsItem(
{
Name: `Tes`,
Age: `35`,
Alignment: `💜 Lawful evil`,
Race: `🎭 Changeling`,
Class: `🧙♂️ Wizard`
}),
new RoleplayDataStatsItem(
{
Name: `Kalla`,
Age: `47`,
Alignment: `🤎 Neutral evil`,
Race: `🤖 Warforged`,
Class: `🦹♂️ Sorcerer`
}),
new RoleplayDataStatsItem(
{
Name: `Halimath Dundragon`,
Age: `149`,
Alignment: `🤍 Unaligned`,
Race: `🐲 Dragonborn`,
Class: `⚔️ Paladin`
}),
new RoleplayDataStatsItem(
{
Name: `Iriphawa`,
Age: `39`,
Alignment: `💛 Lawful neutral`,
Race: `🧝🏻♂️ Half-Elf`,
Class: `🏹 Ranger`
}),
new RoleplayDataStatsItem(
{
Name: `Quaf`,
Age: `25`,
Alignment: `💚 Neutral`,
Race: `👩 Human`,
Class: `🥊 Fighter`
}),
new RoleplayDataStatsItem(
{
Name: `Rat Scratch`,
Age: `15`,
Alignment: `🤎 Neutral evil`,
Race: `🐡 Locathah`,
Class: `🍁 Druid`
}),
new RoleplayDataStatsItem(
{
Name: `Slicer`,
Age: `57`,
Alignment: `💜 Lawful evil`,
Race: `🐡 Locathah`,
Class: `💪 Barbarian`
}),
new RoleplayDataStatsItem(
{
Name: `Nereones Ahlorsath`,
Age: `95`,
Alignment: `💛 Lawful neutral`,
Race: `👩 Human`,
Class: `🥊 Fighter`
}),
new RoleplayDataStatsItem(
{
Name: `Nalvarti Stonecutter`,
Age: `118`,
Alignment: `❤️ Neutral good`,
Race: `🧝♀️ Elf`,
Class: `❤️ Cleric`
}),
new RoleplayDataStatsItem(
{
Name: `Errk`,
Age: `22`,
Alignment: `🤎 Neutral evil`,
Race: `🧝🏻♂️ Half-Elf`,
Class: `🎻 Bard`
}),
new RoleplayDataStatsItem(
{
Name: `Seven Thundercloud`,
Age: `43`,
Alignment: `💖 Lawful good`,
Race: `🐡 Locathah`,
Class: `⚔️ Paladin`
}),
new RoleplayDataStatsItem(
{
Name: `Navarra Chergoba`,
Age: `16`,
Alignment: `💜 Lawful evil`,
Race: `🐯 Tabaxi`,
Class: `❤️ Cleric`
}),
new RoleplayDataStatsItem(
{
Name: `Sail Snap`,
Age: `56`,
Alignment: `💖 Lawful good`,
Race: `🌳 Arboren`,
Class: `💪 Barbarian`
}),
new RoleplayDataStatsItem(
{
Name: `Urreek`,
Age: `17`,
Alignment: `💜 Lawful evil`,
Race: `🧝🏻♂️ Half-Elf`,
Class: `🐉 Warlock`
}),
new RoleplayDataStatsItem(
{
Name: `Morkral Firetamer`,
Age: `24`,
Alignment: `🤎 Neutral evil`,
Race: `🐲 Dragonborn`,
Class: `🙏🏻 Monk`
}),
new RoleplayDataStatsItem(
{
Name: `Vithka`,
Age: `53`,
Alignment: `💜 Lawful evil`,
Race: `🐡 Locathah`,
Class: `⚔️ Paladin`
}),
new RoleplayDataStatsItem(
{
Name: `Sandrue Avhoste`,
Age: `19`,
Alignment: `💙 Chaotic Neutral`,
Race: `🐲 Dragonborn`,
Class: `🗡️ Rogue`
}),
new RoleplayDataStatsItem(
{
Name: `Hapah Moq`,
Age: `34`,
Alignment: `💜 Lawful evil`,
Race: `🎅🏽 Dwarf`,
Class: `🎻 Bard`
}),
new RoleplayDataStatsItem(
{
Name: `Kothar `,
Age: `55`,
Alignment: `🤍 Unaligned`,
Race: `🧝🏻♂️ Half-Elf`,
Class: `🐉 Warlock`
}),
new RoleplayDataStatsItem(
{
Name: `Senen`,
Age: `40`,
Alignment: `💜 Lawful evil`,
Race: `🧒🏻 Hafling`,
Class: `🥊 Fighter`
}),
];
super(...newItems.slice(0));
}
}
}
tsimport 'igniteui-webcomponents-grids/grids/combined';
import { ComponentRenderer, WebGridDescriptionModule, WebSelectDescriptionModule } from 'igniteui-webcomponents-core';
import { IgcGridComponent, IgcColumnComponent } from 'igniteui-webcomponents-grids/grids';
import { RoleplayDataStatsItem, RoleplayDataStats } from './RoleplayDataStats';
import { IgcCellTemplateContext } from 'igniteui-webcomponents-grids/grids';
import { html, nothing } from 'lit-html';
import "igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
import 'igniteui-webcomponents/themes/light/bootstrap.css';
import { defineAllComponents } from 'igniteui-webcomponents';
defineAllComponents();
import "./index.css";
export class Sample {
private grid1: IgcGridComponent
private column1: IgcColumnComponent
private column2: IgcColumnComponent
private column3: IgcColumnComponent
private _bind: () => void;
constructor() {
var grid1 = this.grid1 = document.getElementById('grid1') as IgcGridComponent;
var column1 = this.column1 = document.getElementById('column1') as IgcColumnComponent;
var column2 = this.column2 = document.getElementById('column2') as IgcColumnComponent;
var column3 = this.column3 = document.getElementById('column3') as IgcColumnComponent;
this._bind = () => {
grid1.data = this.roleplayDataStats;
column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
column2.inlineEditorTemplate = this.webGridCellEditCellTemplate;
column3.inlineEditorTemplate = this.webGridCellEditCellTemplate;
}
this._bind();
}
private _roleplayDataStats: RoleplayDataStats = null;
public get roleplayDataStats(): RoleplayDataStats {
if (this._roleplayDataStats == null)
{
this._roleplayDataStats = new RoleplayDataStats();
}
return this._roleplayDataStats;
}
private _componentRenderer: ComponentRenderer = null;
public get renderer(): ComponentRenderer {
if (this._componentRenderer == null) {
this._componentRenderer = new ComponentRenderer();
var context = this._componentRenderer.context;
WebGridDescriptionModule.register(context);
WebSelectDescriptionModule.register(context);
}
return this._componentRenderer;
}
public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
let cellValues: any = [];
let uniqueValues: any = [];
let roleplayDataStats = this.grid1.data;
for(const i of (roleplayDataStats as any)){
const field: string = ctx.cell.column.field;
if(uniqueValues.indexOf(i[field]) === -1 )
{
if (ctx.cell.value == i[field]) {
cellValues.push(html`<igc-select-item selected value=${i[field]}>${(i[field])}</igc-select-item>`);
} else cellValues.push(html`<igc-select-item value=${i[field]}>${(i[field])}</igc-select-item>`);
uniqueValues.push(i[field]);
}
}
return html`
<igc-select style="width:100%; height:100%; --ig-size: var(--ig-size-large);" @igcChange=${(e: any) => ctx.cell.editValue = e.detail.value}>
${cellValues}
</igc-select>
`;
}
}
new Sample();
ts<!DOCTYPE html>
<html>
<head>
<title>Sample | Ignite UI | Web Components | infragistics</title>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
<link rel="stylesheet" href="/src/index.css" type="text/css" />
</head>
<body>
<div id="root">
<div class="container sample ig-typography">
<div class="container fill">
<igc-grid
auto-generate="false"
name="grid1"
id="grid1"
primary-key="Name">
<igc-column
field="Name"
header="Character Name"
data-type="string">
</igc-column>
<igc-column
field="Race"
header="Race"
data-type="string"
editable="true"
name="column1"
id="column1">
</igc-column>
<igc-column
field="Class"
header="Class"
editable="true"
data-type="string"
name="column2"
id="column2">
</igc-column>
<igc-column
field="Age"
header="Age"
data-type="string"
editable="true">
</igc-column>
<igc-column
field="Alignment"
header="Alignment"
editable="true"
data-type="string"
name="column3"
id="column3">
</igc-column>
</igc-grid>
</div>
</div>
</div>
<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
html/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */
css
Grid Excel スタイル編集
Excel スタイル編集を使用すると、Excel を使用する場合と同じようにセルをナビゲートし、すばやく編集できます。
このカスタム機能を実装するには、IgcGridComponent
のイベントを使用します。最初にグリッドの keydown イベントにフックし、そこから 2 つの機能を実装できます。
- 常時編集モード
public keydownHandler(event) {
const key = event.keyCode;
const grid = this.grid;
const activeElem = grid.navigation.activeNode;
if ((key >= 48 && key <= 57) ||
(key >= 65 && key <= 90) ||
(key >= 97 && key <= 122)) {
// Number or Alphabet upper case or Alphabet lower case
const columnName = grid.getColumnByVisibleIndex(activeElem.column).field;
const cell = grid.getCellByColumn(activeElem.row, columnName);
if (cell && !grid.crudService.cellInEditMode) {
grid.crudService.enterEditMode(cell);
cell.editValue = event.key;
}
}
}
typescript
- Enter/Shift+Enter ナビゲーション
if (key == 13) {
let thisRow = activeElem.row;
const column = activeElem.column;
const rowInfo = grid.dataView;
// to find the next eligible cell, we will use a custom method that will check the next suitable index
let nextRow = this.getNextEditableRowIndex(thisRow, rowInfo, event.shiftKey);
// and then we will navigate to it using the grid's built in method navigateTo
this.grid.navigateTo(nextRow, column, (obj) => {
obj.target.activate();
this.grid.clearCellSelection();
this.cdr.detectChanges();
});
}
typescript
次の適格なインデックスを見つけるための重要な部分は以下のようになります。
//first we check if the currently selected cell is the first or the last
if (currentRowIndex < 0 || (currentRowIndex === 0 && previous) || (currentRowIndex >= dataView.length - 1 && !previous)) {
return currentRowIndex;
}
// in case using shift + enter combination, we look for the first suitable cell going up the field
if (previous) {
return dataView.findLastIndex((rec, index) => index < currentRowIndex && this.isEditableDataRecordAtIndex(index, dataView));
}
// or for the next one down the field
return dataView.findIndex((rec, index) => index > currentRowIndex && this.isEditableDataRecordAtIndex(index, dataView));
typescript
詳細については、サンプルを参照してください。
Web Components Grid Excel スタイル編集のサンプル
export class NwindDataItem {
public constructor(init: Partial<NwindDataItem>) {
Object.assign(this, init);
}
public ProductID: number;
public ProductName: string;
public SupplierID: number;
public CategoryID: number;
public QuantityPerUnit: string;
public UnitPrice: number;
public UnitsInStock: number;
public UnitsOnOrder: number;
public ReorderLevel: number;
public Discontinued: boolean;
public OrderDate: string;
public Rating: number;
public Locations: NwindDataItem_LocationsItem[];
}
export class NwindDataItem_LocationsItem {
public constructor(init: Partial<NwindDataItem_LocationsItem>) {
Object.assign(this, init);
}
public Shop: string;
public LastInventory: string;
}
export class NwindData extends Array<NwindDataItem> {
public constructor(items: Array<NwindDataItem> | number = -1) {
if (Array.isArray(items)) {
super(...items);
} else {
const newItems = [
new NwindDataItem(
{
ProductID: 1,
ProductName: `Chai`,
SupplierID: 1,
CategoryID: 1,
QuantityPerUnit: `10 boxes x 20 bags`,
UnitPrice: 18,
UnitsInStock: 39,
UnitsOnOrder: 30,
ReorderLevel: 10,
Discontinued: false,
OrderDate: `2012-02-12`,
Rating: 5,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Fun-Tasty Co.`,
LastInventory: `2018-06-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
})]
}),
new NwindDataItem(
{
ProductID: 2,
ProductName: `Chang`,
SupplierID: 1,
CategoryID: 1,
QuantityPerUnit: `24 - 12 oz bottles`,
UnitPrice: 19,
UnitsInStock: 17,
UnitsOnOrder: 40,
ReorderLevel: 25,
Discontinued: true,
OrderDate: `2003-03-17`,
Rating: 5,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Super Market`,
LastInventory: `2018-09-09`
})]
}),
new NwindDataItem(
{
ProductID: 3,
ProductName: `Aniseed Syrup`,
SupplierID: 1,
CategoryID: 2,
QuantityPerUnit: `12 - 550 ml bottles`,
UnitPrice: 10,
UnitsInStock: 13,
UnitsOnOrder: 70,
ReorderLevel: 25,
Discontinued: false,
OrderDate: `2006-03-17`,
Rating: 3,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Street Market`,
LastInventory: `2018-12-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `24/7 Market`,
LastInventory: `2018-11-11`
})]
}),
new NwindDataItem(
{
ProductID: 4,
ProductName: `Chef Antons Cajun Seasoning`,
SupplierID: 2,
CategoryID: 2,
QuantityPerUnit: `48 - 6 oz jars`,
UnitPrice: 22,
UnitsInStock: 53,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2016-03-17`,
Rating: 3,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Fun-Tasty Co.`,
LastInventory: `2018-06-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Street Market`,
LastInventory: `2018-12-12`
})]
}),
new NwindDataItem(
{
ProductID: 5,
ProductName: `Chef Antons Gumbo Mix`,
SupplierID: 2,
CategoryID: 2,
QuantityPerUnit: `36 boxes`,
UnitPrice: 21.35,
UnitsInStock: 0,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: true,
OrderDate: `2011-11-11`,
Rating: 5,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Super Market`,
LastInventory: `2018-09-09`
})]
}),
new NwindDataItem(
{
ProductID: 6,
ProductName: `Grandmas Boysenberry Spread`,
SupplierID: 3,
CategoryID: 2,
QuantityPerUnit: `12 - 8 oz jars`,
UnitPrice: 25,
UnitsInStock: 0,
UnitsOnOrder: 30,
ReorderLevel: 25,
Discontinued: false,
OrderDate: `2017-12-17`,
Rating: 4,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Super Market`,
LastInventory: `2018-09-09`
})]
}),
new NwindDataItem(
{
ProductID: 7,
ProductName: `Uncle Bobs Organic Dried Pears`,
SupplierID: 3,
CategoryID: 7,
QuantityPerUnit: `12 - 1 lb pkgs.`,
UnitPrice: 30,
UnitsInStock: 150,
UnitsOnOrder: 30,
ReorderLevel: 10,
Discontinued: false,
OrderDate: `2016-07-17`,
Rating: 5,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Fun-Tasty Co.`,
LastInventory: `2018-06-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Street Market`,
LastInventory: `2018-12-12`
})]
}),
new NwindDataItem(
{
ProductID: 8,
ProductName: `Northwoods Cranberry Sauce`,
SupplierID: 3,
CategoryID: 2,
QuantityPerUnit: `12 - 12 oz jars`,
UnitPrice: 40,
UnitsInStock: 6,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2018-01-17`,
Rating: 4,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Fun-Tasty Co.`,
LastInventory: `2018-06-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
})]
}),
new NwindDataItem(
{
ProductID: 9,
ProductName: `Mishi Kobe Niku`,
SupplierID: 4,
CategoryID: 6,
QuantityPerUnit: `18 - 500 g pkgs.`,
UnitPrice: 97,
UnitsInStock: 29,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: true,
OrderDate: `2010-02-17`,
Rating: 4,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
})]
}),
new NwindDataItem(
{
ProductID: 10,
ProductName: `Ikura`,
SupplierID: 4,
CategoryID: 8,
QuantityPerUnit: `12 - 200 ml jars`,
UnitPrice: 31,
UnitsInStock: 31,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2008-05-17`,
Rating: 3,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Wall Market`,
LastInventory: `2018-12-06`
})]
}),
new NwindDataItem(
{
ProductID: 11,
ProductName: `Queso Cabrales`,
SupplierID: 5,
CategoryID: 4,
QuantityPerUnit: `1 kg pkg.`,
UnitPrice: 21,
UnitsInStock: 22,
UnitsOnOrder: 30,
ReorderLevel: 30,
Discontinued: false,
OrderDate: `2009-01-17`,
Rating: 5,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Fun-Tasty Co.`,
LastInventory: `2018-06-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
})]
}),
new NwindDataItem(
{
ProductID: 12,
ProductName: `Queso Manchego La Pastora`,
SupplierID: 5,
CategoryID: 4,
QuantityPerUnit: `10 - 500 g pkgs.`,
UnitPrice: 38,
UnitsInStock: 86,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2015-11-17`,
Rating: 3,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
})]
}),
new NwindDataItem(
{
ProductID: 13,
ProductName: `Konbu`,
SupplierID: 6,
CategoryID: 8,
QuantityPerUnit: `2 kg box`,
UnitPrice: 6,
UnitsInStock: 24,
UnitsOnOrder: 30,
ReorderLevel: 5,
Discontinued: false,
OrderDate: `2015-03-17`,
Rating: 2,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Super Market`,
LastInventory: `2018-09-09`
})]
}),
new NwindDataItem(
{
ProductID: 14,
ProductName: `Tofu`,
SupplierID: 6,
CategoryID: 7,
QuantityPerUnit: `40 - 100 g pkgs.`,
UnitPrice: 23.25,
UnitsInStock: 35,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2017-06-17`,
Rating: 4,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Street Market`,
LastInventory: `2018-12-12`
})]
}),
new NwindDataItem(
{
ProductID: 15,
ProductName: `Genen Shouyu`,
SupplierID: 6,
CategoryID: 2,
QuantityPerUnit: `24 - 250 ml bottles`,
UnitPrice: 15.5,
UnitsInStock: 39,
UnitsOnOrder: 30,
ReorderLevel: 5,
Discontinued: false,
OrderDate: `2014-03-17`,
Rating: 4,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Local Market`,
LastInventory: `2018-07-03`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Wall Market`,
LastInventory: `2018-12-06`
})]
}),
new NwindDataItem(
{
ProductID: 16,
ProductName: `Pavlova`,
SupplierID: 7,
CategoryID: 3,
QuantityPerUnit: `32 - 500 g boxes`,
UnitPrice: 17.45,
UnitsInStock: 29,
UnitsOnOrder: 30,
ReorderLevel: 10,
Discontinued: false,
OrderDate: `2018-03-28`,
Rating: 2,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Street Market`,
LastInventory: `2018-12-12`
}),
new NwindDataItem_LocationsItem(
{
Shop: `24/7 Market`,
LastInventory: `2018-11-11`
})]
}),
new NwindDataItem(
{
ProductID: 17,
ProductName: `Alice Mutton`,
SupplierID: 7,
CategoryID: 6,
QuantityPerUnit: `20 - 1 kg tins`,
UnitPrice: 39,
UnitsInStock: 0,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: true,
OrderDate: `2015-08-17`,
Rating: 2,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Farmer Market`,
LastInventory: `2018-04-04`
})]
}),
new NwindDataItem(
{
ProductID: 18,
ProductName: `Carnarvon Tigers`,
SupplierID: 7,
CategoryID: 8,
QuantityPerUnit: `16 kg pkg.`,
UnitPrice: 62.5,
UnitsInStock: 42,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2005-09-27`,
Rating: 2,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `24/7 Market`,
LastInventory: `2018-11-11`
}),
new NwindDataItem_LocationsItem(
{
Shop: `Super Market`,
LastInventory: `2018-09-09`
})]
}),
new NwindDataItem(
{
ProductID: 19,
ProductName: `Teatime Chocolate Biscuits`,
SupplierID: 8,
CategoryID: 3,
QuantityPerUnit: ``,
UnitPrice: 9.2,
UnitsInStock: 25,
UnitsOnOrder: 30,
ReorderLevel: 5,
Discontinued: false,
OrderDate: `2001-03-17`,
Rating: 2,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Local Market`,
LastInventory: `2018-07-03`
})]
}),
new NwindDataItem(
{
ProductID: 20,
ProductName: `Sir Rodneys Marmalade`,
SupplierID: 8,
CategoryID: 3,
QuantityPerUnit: `4 - 100 ml jars`,
UnitPrice: 4.5,
UnitsInStock: 40,
UnitsOnOrder: 30,
ReorderLevel: 0,
Discontinued: false,
OrderDate: `2005-03-17`,
Rating: 5,
Locations: [
new NwindDataItem_LocationsItem(
{
Shop: `Super Market`,
LastInventory: `2018-09-09`
})]
}),
];
super(...newItems.slice(0));
}
}
}
tsimport 'igniteui-webcomponents-grids/grids/combined';
import { ComponentRenderer, WebGridDescriptionModule } from 'igniteui-webcomponents-core';
import { IgcCellType, IgcGridComponent } from 'igniteui-webcomponents-grids/grids';
import { NwindData } from './NwindData';
import "igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
import "./index.css";
export class Sample {
private grid1: IgcGridComponent
private _bind: () => void;
private shouldAppendValue = false;
constructor() {
var grid1 = this.grid1 = document.getElementById('grid1') as IgcGridComponent;
this._bind = () => {
grid1.data = this.nwindData;
grid1.addEventListener('activeNodeChange', (event: any) => {
grid1.endEdit();
(grid1.getElementsByClassName("igx-grid__tbody-content")[0] as any).focus();
});
grid1.addEventListener('keydown', (event: KeyboardEvent) => {
var code = event.code;
var activeElem = grid1.selectedCells[0];
if ((event.code >= 'Digit0' && event.code <= 'Digit9') ||
(event.code >= 'KeyA' && event.code <= 'KeyZ') ||
(event.code >= 'Numpad0' && event.code <= 'Numpad9') &&
event.code !== 'Enter' && event.code !== 'NumpadEnter') {
if (activeElem && activeElem.editMode === false) {
activeElem.editMode = true;
activeElem.editValue = event.key;
this.shouldAppendValue = true;
grid1.markForCheck();
} else
if (activeElem && activeElem.editMode && this.shouldAppendValue) {
event.preventDefault();
activeElem.editValue = activeElem.editValue + event.key;
this.shouldAppendValue = false;
}
}
if (code === 'Backspace') {
if(activeElem == null) {
return;
}
const rowIndex = activeElem.row.index;
const columnKey = activeElem.column.field;
grid1.data[rowIndex][columnKey] = '';
grid1.markForCheck();
}
if (code === 'Enter') {
if(activeElem == null) {
return;
}
const thisRow = activeElem.row.index;
const dataView = this.grid1.dataView;
const nextRowIndex = this.getNextEditableRowIndex(thisRow, dataView, event.shiftKey);
grid1.navigateTo(nextRowIndex, activeElem.column.visibleIndex, (obj: any) => {
grid1.clearCellSelection();
obj.target.activate();
});
}
});
}
this._bind();
}
private _nwindData: NwindData = null;
public get nwindData(): NwindData {
if (this._nwindData == null)
{
this._nwindData = new NwindData();
}
return this._nwindData;
}
private _componentRenderer: ComponentRenderer = null;
public get renderer(): ComponentRenderer {
if (this._componentRenderer == null) {
this._componentRenderer = new ComponentRenderer();
var context = this._componentRenderer.context;
WebGridDescriptionModule.register(context);
}
return this._componentRenderer;
}
public getNextEditableRowIndex(currentRowIndex: number, dataView: any[], previous: boolean): number {
if (currentRowIndex < 0 || (currentRowIndex === 0 && previous) || (currentRowIndex >= dataView.length - 1 && !previous)) {
return currentRowIndex;
}
if(previous){
for (let index = dataView.length - 1; index >= 0; index--) {
if (index < currentRowIndex && this.isEditableDataRecordAtIndex(index, dataView)) {
return index;
}
}
return -1
}
return dataView.findIndex((rec, index) => index > currentRowIndex && this.isEditableDataRecordAtIndex(index, dataView));
}
private isEditableDataRecordAtIndex(rowIndex: number, dataView: any[]): boolean {
const rec = dataView[rowIndex];
return !rec.expression && !rec.summaries && !rec.childGridsData && !rec.detailsData
}
}
new Sample();
ts<!DOCTYPE html>
<html>
<head>
<title>Sample | Ignite UI | Web Components | infragistics</title>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
<link rel="stylesheet" href="/src/index.css" type="text/css" />
</head>
<body>
<div id="root">
<div class="container sample ig-typography">
<div class="container fill">
<igc-grid
auto-generate="false"
primary-key="ProductID"
cell-selection="single"
name="grid1"
id="grid1">
<igc-column
field="ProductID"
header="Product ID"
editable="true"
groupable="true"
hidden="true">
</igc-column>
<igc-column
field="ProductName"
header="Product Name"
data-type="string"
editable="true">
</igc-column>
<igc-column
field="UnitPrice"
header="Unit Price"
data-type="number"
editable="true">
</igc-column>
<igc-column
field="QuantityPerUnit"
header="Quantity Per Unit"
groupable="true"
data-type="string"
editable="true">
</igc-column>
<igc-column
field="ReorderLevel"
header="Reorder Level"
data-type="number"
groupable="true"
editable="true">
</igc-column>
</igc-grid>
</div>
</div>
</div>
<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
html/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */
css
上記のアプローチの主な利点は次のとおりです:
- 常時編集モード: セルが選択されているときに入力すると、編集モードに入り、入力された値が既存の値を置き換えます。
- Enter/Shift+Enter で移動する場合、データ以外の行はスキップされます。これにより、ユーザーは値をすばやく切り替えることができます。
CRUD 操作
CRUD 操作を実行した場合、filtering、sorting、grouping などのパイプが再適用されるため、ビューが自動的に更新されることに注意してください。
IgcGridComponent
は基本的な CRUD 操作のための簡易な API を提供します。
新しいレコードの追加
IgcGridComponent
コンポーネントは、提供したデータをデータ ソースに追加する addRow
メソッドを公開します。
// Adding a new record
// Assuming we have a `getNewRecord` method returning the new row data.
const record = this.getNewRecord();
this.grid.addRow(record);
typescript
データを Grid で更新
Grid のデータ更新は、グリッドで PrimaryKey が定義されている場合のみ updateRow
と updateCell
メソッドで行うことができます。セルと行の値またはそのいずれかを各 update メソッドで直接更新できます。
// Updating the whole row
this.grid.updateRow(newData, this.selectedCell.cellID.rowID);
// Just a particular cell through the Grid API
this.grid.updateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
// Directly using the cell `update` method
this.selectedCell.update(newData);
// Directly using the row `update` method
const row = this.grid.getRowByKey(rowID);
row.update(newData);
typescript
Grid からデータを削除
deleteRow
メソッドは、primaryKey
が定義されている場合に指定した行のみを削除することに注意してください。
// Delete row through Grid API
this.grid.deleteRow(this.selectedCell.cellID.rowID);
// Delete row through row object
const row = this.grid.getRowByIndex(rowIndex);
row.delete();
typescript
編集イベントでのセル検証
IgcGridComponent
の編集イベントを使用して、ユーザーが IgcGridComponent
を操作する方法を変更できます。
この例では、CellEdit
イベントにバインドすることにより、入力されたデータに基づいてセルを検証します。セルの新しい値が事前定義された基準を満たしていない場合、イベントをキャンセルすることでデータソースに到達しないようにします。
最初に必要なことは、グリッドのイベントにバインドすることです。
constructor() {
var grid = document.getElementById('grid') as IgcGridComponent;
this.webGridCellEdit = this.webGridCellEdit.bind(this);
grid.addEventListener("cellEdit", this.webGridCellEdit);
}
typescript
CellEdit
は、セルの値がコミットされる直前に発生します。CellEdit の定義では、アクションを実行する前に特定の列を確認する必要があります。
public webGridCellEdit(event: CustomEvent<IgcGridEditEventArgs>): void {
const column = event.detail.column;
if (column.field === 'UnitsOnOrder') {
const rowData = event.detail.rowData;
if (!rowData) {
return;
}
if (event.detail.newValue > rowData.UnitsInStock) {
event.cancel = true;
alert("You cannot order more than the units in stock!");
}
}
}
typescript
Units On Order (注文済み) 列の下のセルに入力された値が使用可能量 (Units in Stock、在庫数 の値) よりも大きい場合、編集はキャンセルされ、ユーザーにキャンセルの警告が表示されます。
以下は、上記の検証が IgcGridComponent
に適用された結果のデモです。
import 'igniteui-webcomponents-grids/grids/combined';
import { ComponentRenderer, WebGridDescriptionModule } from 'igniteui-webcomponents-core';
import { IgcGridComponent, IgcColumnComponent } from 'igniteui-webcomponents-grids/grids';
import NwindData from './NwindData.json';
import { IgcGridEditEventArgs } from 'igniteui-webcomponents-grids/grids';
import "igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
import "./index.css";
export class Sample {
private grid1: IgcGridComponent
private unitsInStock: IgcColumnComponent
private unitsOnOrder: IgcColumnComponent
private _bind: () => void;
constructor() {
var grid1 = this.grid1 = document.getElementById('grid1') as IgcGridComponent;
this.webGridEditingEventsCellEdit = this.webGridEditingEventsCellEdit.bind(this);
var unitsInStock = this.unitsInStock = document.getElementById('UnitsInStock') as IgcColumnComponent;
var unitsOnOrder = this.unitsOnOrder = document.getElementById('UnitsOnOrder') as IgcColumnComponent;
this._bind = () => {
grid1.data = this.nwindData;
grid1.addEventListener("cellEdit", this.webGridEditingEventsCellEdit);
}
this._bind();
}
private _nwindData: any[] = NwindData;
public get nwindData(): any[] {
return this._nwindData;
}
private _componentRenderer: ComponentRenderer = null;
public get renderer(): ComponentRenderer {
if (this._componentRenderer == null) {
this._componentRenderer = new ComponentRenderer();
var context = this._componentRenderer.context;
WebGridDescriptionModule.register(context);
}
return this._componentRenderer;
}
public webGridEditingEventsCellEdit(args: CustomEvent<IgcGridEditEventArgs>): void {
var d = args.detail;
if (d.column != null && d.column.field == "UnitsOnOrder") {
if (d.newValue > d.rowData.UnitsInStock) {
d.cancel = true;
alert("You cannot order more than the units in stock!")
}
}
}
}
new Sample();
ts<!DOCTYPE html>
<html>
<head>
<title>Sample | Ignite UI | Web Components | infragistics</title>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
<link rel="stylesheet" href="/src/index.css" type="text/css" />
</head>
<body>
<div id="root">
<div class="container sample ig-typography">
<div class="container fill">
<igc-grid
auto-generate="false"
primary-key="ProductID"
name="grid1"
id="grid1">
<igc-column
field="ProductName"
header="Product Name"
data-type="string">
</igc-column>
<igc-column
field="UnitPrice"
header="Unit Price"
data-type="number"
editable="true">
</igc-column>
<igc-column
name="UnitsInStock"
id="UnitsInStock"
field="UnitsInStock"
header="Units In Stock"
data-type="number"
editable="true">
</igc-column>
<igc-column
name="UnitsOnOrder"
id="UnitsOnOrder"
field="UnitsOnOrder"
header="Units on Order"
data-type="number"
editable="true">
</igc-column>
</igc-grid>
</div>
</div>
</div>
<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
html/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */
css
スタイル設定
事前定義されたテーマに加えて、利用可能な CSS プロパティを設定することでグリッドをさらにカスタマイズできます。 一部の色を変更したい場合は、最初にグリッドのクラスを設定する必要があります。
<igc-grid class="grid"></igc-grid>
html
次に、そのクラスに関連する CSS プロパティを設定します。
.grid {
--ig-grid-edit-mode-color: orange;
--ig-grid-cell-editing-background: lightblue;
}
css
スタイル設定の例
import 'igniteui-webcomponents-grids/grids/combined';
import { ComponentRenderer, WebGridDescriptionModule, WebPaginatorDescriptionModule } from 'igniteui-webcomponents-core';
import { IgcGridComponent } from 'igniteui-webcomponents-grids/grids';
import NwindData from './NwindData.json';
import "igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
import "./index.css";
export class Sample {
private grid: IgcGridComponent
private _bind: () => void;
constructor() {
var grid = this.grid = document.getElementById('grid') as IgcGridComponent;
this._bind = () => {
grid.data = this.nwindData;
}
this._bind();
}
private _nwindData: any[] = NwindData;
public get nwindData(): any[] {
return this._nwindData;
}
private _componentRenderer: ComponentRenderer = null;
public get renderer(): ComponentRenderer {
if (this._componentRenderer == null) {
this._componentRenderer = new ComponentRenderer();
var context = this._componentRenderer.context;
WebGridDescriptionModule.register(context);
WebPaginatorDescriptionModule.register(context);
}
return this._componentRenderer;
}
}
new Sample();
ts<!DOCTYPE html>
<html>
<head>
<title>Sample | Ignite UI | Web Components | infragistics</title>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" />
<link rel="stylesheet" href="/src/index.css" type="text/css" />
</head>
<body>
<div id="root">
<div class="container sample ig-typography">
<div class="container fill">
<igc-grid
auto-generate="false"
id="grid"
name="grid"
id="grid"
primary-key="ProductID"
allow-filtering="true">
<igc-paginator
per-page="10">
</igc-paginator>
<igc-column
field="ProductName"
header="Product Name"
data-type="string"
sortable="true"
has-summary="true"
editable="true"
resizable="true">
</igc-column>
<igc-column
field="UnitsInStock"
header="Units in Stock"
data-type="number"
sortable="true"
has-summary="true"
editable="true"
resizable="true">
</igc-column>
<igc-column
field="OrderDate"
header="Order Date"
data-type="date"
sortable="true"
has-summary="true"
editable="true"
resizable="true">
</igc-column>
<igc-column
field="Discontinued"
header="Discontinued"
data-type="boolean"
sortable="true"
has-summary="true"
editable="true">
</igc-column>
<igc-column
field="ReorderLevel"
header="Reorder Level"
data-type="number"
sortable="true"
has-summary="true"
editable="true"
filterable="false">
</igc-column>
</igc-grid>
</div>
</div>
</div>
<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
html/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */
#grid {
--ig-size: var(--ig-size-medium);
}
#grid {
--ig-grid-edit-mode-color: #FFA500;
--ig-grid-cell-active-border-color: #AAFF00;
--ig-grid-cell-editing-background: #ADD8E6;
}
css