<!DOCTYPE html><html><head><title>Sample | Ignite UI | Web Components | infragistics</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" /><linkrel="stylesheet"href="/src/index.css"type="text/css" /></head><body><divid="root"><divclass="container sample ig-typography"><divclass="options vertical"><igc-property-editor-paneldescription-type="WebGrid"is-horizontal="true"is-wrapping-enabled="false"name="propertyEditorPanel1"id="propertyEditorPanel1"><igc-property-editor-property-descriptionname="rowPinningEditor"id="rowPinningEditor"value-type="EnumValue"label="Row Pinning toggle"drop-down-names="Top, Bottom"drop-down-values="Top, Bottom"></igc-property-editor-property-description></igc-property-editor-panel></div><divclass="container fill"><igc-gridauto-generate="false"name="grid"id="grid"id="grid"primary-key="ID"cell-selection="none"row-editable="true"><igc-columnfield="Company"header="Company"width="300px"></igc-column><igc-columnfield="ContactName"header="Name"></igc-column><igc-columnfield="ContactTitle"header="Title"></igc-column><igc-columnfield="Address"header="Address"></igc-column><igc-columnfield="City"header="City"></igc-column><igc-columnfield="PostalCode"header="Postal Code"></igc-column><igc-columnfield="Phone"header="Phone"></igc-column><igc-columnfield="Fax"header="Fax"></igc-column><igc-action-stripname="actionStrip"id="actionStrip"><igc-grid-pinning-actions
></igc-grid-pinning-actions></igc-action-strip></igc-grid></div></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
このサンプルが気に入りましたか? 完全な Ignite UI for Web Componentsツールキットにアクセスして、すばやく独自のアプリの作成を開始します。無料でダウンロードできます。
<!DOCTYPE html><html><head><title>Sample | Ignite UI | Web Components | infragistics</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" /><linkrel="stylesheet"href="/src/index.css"type="text/css" /></head><body><divid="root"><divclass="container sample ig-typography"><divclass="container fill"><igc-gridname="grid"id="grid"primary-key="ID"cell-selection="none"><igc-columnwidth="70px"filterable="false"pinned="true"name="column1"id="column1"></igc-column><igc-columnfield="ID"width="150px"hidden="true"></igc-column><igc-columnfield="Company"header="Company"width="350px"></igc-column><igc-columnfield="ContactName"header="Name"></igc-column><igc-columnfield="ContactTitle"header="Contact Tiasdsadtle"></igc-column><igc-columnfield="Address"></igc-column><igc-columnfield="City"></igc-column><igc-columnfield="PostalCode"header="Postal Code"></igc-column><igc-columnfield="Phone"></igc-column><igc-columnfield="Fax"></igc-column></igc-grid></div></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
import'igniteui-webcomponents-grids/grids/combined';
import { ComponentRenderer, WebGridDescriptionModule, WebActionStripDescriptionModule } from'igniteui-webcomponents-core';
import { IgcGridComponent, IgcPinningConfig, RowPinningPosition, IgcColumnComponent } from'igniteui-webcomponents-grids/grids';
import CustomersDataLocal from'./CustomersDataLocal.json';
import"igniteui-webcomponents-grids/grids/themes/light/bootstrap.css";
import"./index.css";
exportclassSample{
private grid: IgcGridComponent
private _pinningConfig1: IgcPinningConfig | null = null;
publicgetpinningConfig1(): IgcPinningConfig {
if (this._pinningConfig1 == null)
{
var pinningConfig1: IgcPinningConfig = {} as IgcPinningConfig;
pinningConfig1.rows = RowPinningPosition.Top;
this._pinningConfig1 = pinningConfig1;
}
returnthis._pinningConfig1;
}
private company: IgcColumnComponent
private contactName: IgcColumnComponent
private contactTitle: IgcColumnComponent
private address: IgcColumnComponent
private city: IgcColumnComponent
private postalCode: IgcColumnComponent
private phone: IgcColumnComponent
private fax: IgcColumnComponent
private _bind: () =>void;
constructor() {
var grid = this.grid = document.getElementById('grid') as IgcGridComponent;
this.webGridPinRowOnRendered = this.webGridPinRowOnRendered.bind(this);
var company = this.company = document.getElementById('Company') as IgcColumnComponent;
var contactName = this.contactName = document.getElementById('ContactName') as IgcColumnComponent;
var contactTitle = this.contactTitle = document.getElementById('ContactTitle') as IgcColumnComponent;
var address = this.address = document.getElementById('Address') as IgcColumnComponent;
var city = this.city = document.getElementById('City') as IgcColumnComponent;
var postalCode = this.postalCode = document.getElementById('PostalCode') as IgcColumnComponent;
var phone = this.phone = document.getElementById('Phone') as IgcColumnComponent;
var fax = this.fax = document.getElementById('Fax') as IgcColumnComponent;
this._bind = () => {
grid.data = this.customersDataLocal;
grid.addEventListener("rendered", this.webGridPinRowOnRendered);
grid.pinning = this.pinningConfig1;
}
this._bind();
}
private _customersDataLocal: any[] = CustomersDataLocal;
publicgetcustomersDataLocal(): any[] {
returnthis._customersDataLocal;
}
private _componentRenderer: ComponentRenderer = null;
publicgetrenderer(): ComponentRenderer {
if (this._componentRenderer == null) {
this._componentRenderer = new ComponentRenderer();
var context = this._componentRenderer.context;
WebGridDescriptionModule.register(context);
WebActionStripDescriptionModule.register(context);
}
returnthis._componentRenderer;
}
public webGridPinRowOnRendered(args: any): void {
var grid = this.grid asany;
grid.pinRow("ALFKI");
grid.pinRow("AROUT");
}
}
new Sample();
ts
<!DOCTYPE html><html><head><title>Sample | Ignite UI | Web Components | infragistics</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" /><linkrel="stylesheet"href="/src/index.css"type="text/css" /></head><body><divid="root"><divclass="container sample ig-typography"><divclass="container fill"><igc-gridauto-generate="false"name="grid"id="grid"id="grid"primary-key="ID"cell-selection="none"><igc-columnname="Company"id="Company"field="Company"header="Company"width="300px"></igc-column><igc-columnname="ContactName"id="ContactName"field="ContactName"header="Name"></igc-column><igc-columnname="ContactTitle"id="ContactTitle"field="ContactTitle"header="Title"></igc-column><igc-columnname="Address"id="Address"field="Address"header="Address"></igc-column><igc-columnname="City"id="City"field="City"header="City"></igc-column><igc-columnname="PostalCode"id="PostalCode"field="PostalCode"header="Postal Code"></igc-column><igc-columnname="Phone"id="Phone"field="Phone"header="Phone"></igc-column><igc-columnname="Fax"id="Fax"field="Fax"header="Fax"></igc-column><igc-action-strip
><igc-grid-pinning-actions
></igc-grid-pinning-actions></igc-action-strip></igc-grid></div></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html