How can I listen to the click event of kendo filter grid

4 posts, 0 answers
  1. Karthik
    Karthik avatar
    6 posts
    Member since:
    Oct 2015

    Posted 17 Aug 2017 Link to this post

    Hi,

    I have a grid and it has filter with different filterable operators. Now when I click the filter and apply a condition, there is a server side filtering happening and results are shown.

    Now when I do a second level filter on a column , I need to restrict the operator of that filterable column. To achieve this ,I need to have a event that is listening the moment I click filter,Since I am on Kendo UI v2016.1.412 , I am unable to use the callback function "filter" or "filterMenuOpen". Can someone help me as how can I register the click event of filter so that i can then add my custom filter operators.

    $scope.xx = {
    editable : false,
    sortable : true,
    pageable : {
    pageSizes : 1

    },
    filterable : {
    extra : false,
    operators : {
    string : {
    eq : 'Equals to'
    }
    }
    },
    scrollable : false,
    selectable : true,
    columnMenu: true,
    columns : [{
    field : "xx",
    title : translate("xx"),
    filterable : true
    filterMenuOpen:function(e){
    console.log("not triggered");
    },
    filterMenuInit:function(e){
    console.log("not triggered");
    },
    filter:function(e){
    console.log("not triggered ");
    }
    }, {
    field : "xx",
    title : 'xx'
    filterable : <My custom filter>
    }

    }

  2. Stefan
    Admin
    Stefan avatar
    3072 posts

    Posted 21 Aug 2017 Link to this post

    Hello Karthik,

    The desired result can be achieved by adding an event listener on the filterMenuInit event of the Grid.

    I made an example using the provided Kendo UI version to demonstrate the implementation:

    https://dojo.telerik.com/IKaBi

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Karthik
    Karthik avatar
    6 posts
    Member since:
    Oct 2015

    Posted 21 Aug 2017 in reply to Stefan Link to this post

    Hi Stefan,

    Thanks for the reply 

  4. Karthik
    Karthik avatar
    6 posts
    Member since:
    Oct 2015

    Posted 21 Aug 2017 in reply to Stefan Link to this post

    Hi Stefan,

    Thanks for the reply 

Back to Top