1 year ago

#251314

test-img

Bartek

Filtering particular column by array of strings in kendo-grid-column

I have following issue with filtering certain single column in my kendo-grid-column.

It is complex grid with a lot of columns. There is option of filtering columns which uses default build-in filtering. It works well with simple data - but the problem is when I try to filter Keywords Column. Data that is provided there is an array of strings, and I must not change structure of it. I have to deal with it as it is. Solution that changes entire array to one string will satisfy me. I've read in docs about custom filtering, but I don't see desired information there :(

enter image description here

    <div class="grid-wrapper">
  <kendo-grid
    [kendoGridGroupBinding]="rawData"
    [groupable]="true"
    [group]="gridConfig.state.group"
    [kendoGridSelectBy]="selectBy"
    (selectionChange)="select($event)"
    [selectedKeys]="[selectedItem?.ElasticId]"
    [filterable]="'menu'"
    [filter]="gridConfig.state.filter"
    [sortable]="sortable"
    [sort]="sort"
    (sortChange)="sortChange($event)"
    [skip]="gridConfig.state.skip"
    [style.height.%]="100"
    [pageSize]="36"
    (pageChange)="pageChange($event)"
    (dataStateChange)="stateChange($event)"
    scrollable="virtual"
    [rowHeight]="36"
    [resizable]="true"
    [reorderable]="true"
    (columnVisibilityChange)="columnChange(grid)"
    (columnResize)="columnChange(grid)"
    (cellClick)="cellClick($event)"
    #grid>
    <ng-template kendoGridToolbarTemplate position="top" class="full-width fxrow">
      <y-bar
        [data]="gridView"
        (gridFilterEmitter)="gridFilter($event)"
        (orientationEmitter)="changeOrientation($event)"
        (excelEmitter)="saveToExcel()"
        (groupsExpandedEmitter)="expandGroups($event)"
        class="full-width"></y-bar>
    </ng-template>

   
    <kendo-grid-column
      [includeInChooser]="true"
      [hidden]="setColumnVisibility('Keywords')"
      [width]="setColumnWidth('Keywords')"
      field="Keywords"
      title="Keywords">
    </kendo-grid-column>
    <kendo-grid-column
      [includeInChooser]="true"
      [hidden]="setColumnVisibility('SystemUserName')"
      [width]="setColumnWidth('SystemUserName')"
      field="SystemUserName"
      title="System User Name">
    </kendo-grid-column>
    <kendo-grid-column
      [includeInChooser]="true"
      [hidden]="setColumnVisibility('DnsName')"
      [width]="setColumnWidth('DnsName')"
      field="DnsName"
      title="Dns">
    </kendo-grid-column>
    <kendo-grid-column
      [includeInChooser]="true"
      [width]="setColumnWidth('AdditionalInfo')"
      [hidden]="setColumnVisibility('AdditionalInfo')"
      field="AdditionalInfo"
      title="Additional Info">
    </kendo-grid-column>
    <kendo-grid-column
      [includeInChooser]="true"
      [hidden]="setColumnVisibility('ElasticId')"
      [width]="setColumnWidth('ElasticId')"
      field="ElasticId"
      title="Elastic Id">
    </kendo-grid-column>
 

    <kendo-grid-excel fileName="LonginusLogFile.xlsx" [fetchData]="allData"></kendo-grid-excel>
  </kendo-grid>
  <time-selection-context-menu #contextMenu></time-selection-context-menu>
</div>

angular

kendo-grid

kendo-angular-ui

0 Answers

Your Answer

Accepted video resources