Accessing attributes in a Filter.

1 Answer 46 Views
Filter Grid
George
Top achievements
Rank 2
Iron
Iron
Iron
George asked on 27 Jul 2023, 03:17 PM | edited on 27 Jul 2023, 03:18 PM

Given a filter control and associated grid:

Is there a way to catch the click event of the apply button?

So, I can format the cells in the resulting grid? I tried this code in the dojo with an alert ("...") and I couldn't see the alert popup on the click. I am assuming I have something really wrong here.

 

 

George
Top achievements
Rank 2
Iron
Iron
Iron
commented on 17 Aug 2023, 07:26 PM

Nikolay -- I solved my problem in a totally different way. I am altering my data source prior to binding it with the grid. I was looking at this and I couldn't figure out why I even asked this question... I was way wrong in the approach of what I wanted to do. Sorry to trouble you with this.
Nikolay
Telerik team
commented on 18 Aug 2023, 06:02 PM

Hi George,

Thank you for the update and thank yo for sharing the approach you went for.

It would be awesome if you can share some code here so others facing the same scenario can benefit from it as well.

Regards,

Nikolay

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 01 Aug 2023, 11:54 AM

Hello George,

You can add a click event handler to the Apply Filter button with jQuery:

        $("button[data-command='apply']").click(function() {
            var grid = $("#grid").data("kendoGrid");
            console.log(grid)
          })

Dojo demo: https://dojo.telerik.com/EXiWaYeG

Please let me know if this is what you ate looking for.

Regards,
Nikolay
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
Filter Grid
Asked by
George
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Nikolay
Telerik team
Share this question
or