簡體   English   中英

Kendo Angular 2網格過濾器類似於Excel

[英]Kendo Angular 2 Grid Filter similar to Excel

我們如何使用kendo-angular在網格上實現類似於excel的過濾。 我在文檔中找不到解決方案。

這是JQuery版本中的功能: http : //demos.telerik.com/kendo-ui/spreadsheet/sorting-filtering

編輯1:與此類似的過濾器

在此處輸入圖片說明

這是一個例子:

<kendo-grid-column field="ProductName" title="Product Name">
   <ng-template kendoGridFilterCellTemplate let-filter let-column="column">
     <kendo-grid-string-filter-cell
       [showOperators]="false"
       [column]="column"
       [filter]="filter">
     </kendo-grid-string-filter-cell>
   </ng-template>
</kendo-grid-column>

http://www.telerik.com/kendo-angular-ui/components/grid/filtering/built-in-template/

這是一個示例:(在其中的“過濾器菜單”選項中。遵循倒數第二個示例)

https://www.telerik.com/kendo-angular-ui/components/grid/filtering/reusable-filter/

小小的變化。 有“ multicheck-filter.component.ts”文件將給您此錯誤:

類型“ FilterDescriptor |屬性”上不存在屬性“值” CompositeFilterDescriptor”。 類型“ CompositeFilterDescriptor”上不存在屬性“值”。

要解決該問題,您需要替換ngAfterViewInit()中的以下給定代碼

this.value = this.currentFilter.filters.map(FilterDescriptor => f.value);

用下面給出的代碼。

this.value = this.currentFilter.filters.map((f:FilterDescriptor)=> f.value);

並從“ @ progress / kendo-data-query”導入“ FilterDescriptor”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM