filter button disabled in grid filter menu popup

2 Answers 57 Views
Grid
Chahid
Top achievements
Rank 1
Chahid asked on 23 Jun 2021, 09:03 AM

Hello, I am currently facing an issue with the "Filter" button in the filter menu popup of my grid.

I implemented a grid with a customized filter menu where I have set the [extra] option to false so I have to fill only one input, as following:

<kendo-grid-column field="ProductName" title="Product Name">
   <ng-template kendoGridFilterMenuTemplate let-filter let-column="column" let-filterService="filterService">
     <kendo-grid-string-filter-menu [extra]="false" [column]="column" [filter]="filter" [filterService]="filterService">
     </kendo-grid-string-filter-menu>
   </ng-template>

</kendo-grid-column>

I used the same code to create other grids in my application and I am not facing this issue. Here when I open the filter menu popin, the "Filter" button is first disabled which is normal as I must type something in the filter input to enable it, but even if I do, the "Filter" button stays disabled, and I couldn't figure out what am I missing.

Is there any generic bad implementation that can cause this behavior and that I can fix? Or can I at least make the "Filter" button always clickable (I tried to remove the [disabled] option from the template in the kendo-grid-string-filter-menu file but I still have the same issue)?

Thank you in advance for you reply and tell me if you need some further informations.

 

Chahid

 


2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 28 Jun 2021, 06:39 AM

Hi Chahid,

Thank you for the provided details.

The markup looks valid and produces a working filter:

https://stackblitz.com/edit/angular-wsmorg

Please ensure that the filter descriptors are passed to the Grid filter input and  the data is correctly filtred on filterChange (dataStateChange) event:

   <kendo-grid
      [data]="gridData"
      [filter]="filter"
      filterable="menu"
      (filterChange)="filterChange($event)"
      [height]="400"
  public filter: CompositeFilterDescriptor;
  public gridData: any[] = filterBy(sampleProducts, this.filter);

  public filterChange(filter: CompositeFilterDescriptor): void {
    this.filter = filter;
    this.gridData = filterBy(sampleProducts, filter);
  }

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
David
Top achievements
Rank 1
Iron
answered on 22 Sep 2021, 06:32 PM
I had the same issue. I updated it all to the latest version of Telerik and it worked.
Tags
Grid
Asked by
Chahid
Top achievements
Rank 1
Answers by
Martin
Telerik team
David
Top achievements
Rank 1
Iron
Share this question
or