This is a migrated thread and some comments may be shown as answers.

How trigger filterMenuInit event every time we click on the filter

1 Answer 1897 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Niloofar
Top achievements
Rank 1
Niloofar asked on 04 Apr 2016, 02:43 PM

I am creating my own filters on filter initialization and i need to do some logics and adding values in my filter inputs every time the user click on the filter, but the issue is that filterMenuInit is being fired only once. i was wondering how i can raise this event again, or is there any other event which is being raised on the clicking on the filter?

var initializedFilterMenu = function (e) {
//my logic
};
 
var gridOptions = {
  dataSource: dataSource,
  columns: gridColumns,
  editable: gridEditable,
  pageable: {
    refresh: true, //if set to true, it will show refresh button,clicking on that will make the grid to refresh
    numeric: false,
    previousNext: false,
    messages: {
      display: "Loaded {0}-{1} from {2} data items"
    },
  },
  height: gridHeight,
  scrollable: {
    virtual: true,
  },
  groupable: gridGroupable,
  filterable: gridFilterable,
  sortable: {
    mode: "multiple"
  },
   
  filterMenuInit: initializedFilterMenu,  // The initializedFilterMenu event is raised when the filter menu is initialized.
};
 
var grid = Ember.$("#kendo-grid").kendoGrid(gridOptions).data('kendoGrid');
_this.set('kendoGrid', grid);

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 05 Apr 2016, 02:36 PM
Hello Niloofar ,

I would suggest you to see the approach provided in the forum thread below:
http://www.telerik.com/forums/custom-filter-filtermenuinit-fired-only-once

and see if this helps.

Regards,
Maria Ilieva
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Arjun
Top achievements
Rank 1
commented on 29 Jun 2021, 12:47 PM

Hi Team,

Is there any solution that triggers filterable event more than one time, please let us know if any .

Thanks
Arjun
Nikolay
Telerik team
commented on 01 Jul 2021, 07:40 AM

Hi Arjun,

I can recommend using the filterMenuOpen event. It Fires every time the grid filter menu is opened after the animations are completed.

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/filtermenuopen

Let me know if you have any questions.

Regrads,

Nikolay

Angelo
Top achievements
Rank 1
commented on 26 Jan 2022, 04:00 AM | edited

Is there an event which fires every time before the menu opens? I mean, I know there is, but how can I hook into it to run custom code?
Georgi Denchev
Telerik team
commented on 27 Jan 2022, 09:24 AM

Hello, Angelo,

There isn't a particular Kendo Grid event that is fired before the menu is opened. The earliest events are the filterMenuOpen and filterMenuInit as my colleague has previously mentioned.

You could attach a click event to the filter icon element and execute your logic in there. The click will be executed before the menu is opened.

$("#grid .k-grid-filter").on("click",function() {
  console.log("executed before the menu is opened.");
});

Dojo example:

https://dojo.telerik.com/@gdenchev/aSaLEdov 

Best Regards,

Georgi

Tags
Grid
Asked by
Niloofar
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or