1
我對Kendo UI和Angular2非常新穎。 我正在使用Kendo ui和Angular2。 我在每行中都有一個帶有複選框的網格模塊。 我想知道選擇每行的rowid或任何字段值。 如何在打字稿中做到這一點。 下面的代碼是app.component.ts通過選中kendo UI網格模塊中的複選框並選擇打字稿來選擇行
import { Component } from '@angular/core';
import { products } from './products';
@Component({
selector: 'my-app',
template: `
<kendo-grid [data]="gridData" [height]="410">
<kendo-grid-column field="ProductID" title="ID" width="40">
</kendo-grid-column>
<kendo-grid-column field="ProductName" title="Name" width="250">
</kendo-grid-column>
<kendo-grid-column field="Category.CategoryName" title="Category">
</kendo-grid-column>
<kendo-grid-column field="UnitPrice" title="Price" width="80">
</kendo-grid-column>
<kendo-grid-column field="UnitsInStock" title="In stock" width="80">
</kendo-grid-column>
<kendo-grid-column field="Discontinued" title="Discontinued" width="120">
<ng-template kendoGridCellTemplate let-dataItem>
<input type="checkbox" [checked]="dataItem.Discontinued" enabled/>
</ng-template>
</kendo-grid-column>
</kendo-grid>
`
})
export class AppComponent {
private gridData: any[] = products;
}
誰能請幫助我如何使用打字稿去實現它。
任何人在這裏,誰在Kendo UI和Angular2工作,請幫助我 – ananya