Author Topic: Filter header box  (Read 4591 times)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Filter header box
« Reply #15 on: May 20, 2021, 04:03:39 pm »
It's supposed to work.

Please share a complete test case on stackblitz.

rebound.support

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Filter header box
« Reply #16 on: May 20, 2021, 07:27:31 pm »
Hi,

I want to bind dynamic header data into to dropdown in filter section. Please help or provide me example of code to binding dynamic data in filter section.
===============================================

filter: function () {
                        $.getJSON("controls/Nuggets/KPITargetMainInfoNew/KPITargetMainInfoNew.ashx?Action=MonthNew", function (response) {
                            grid.getColumn({ dataIndx: "MonthName" }).filter.options = [{ 1: "January" }, { 2: "February" }, { 3: "March" }, { 4: "April" }, { 5: "May" }, { 6: "June" }, { 7: "July" }, { 8: "August" }, { 9: "September" }, { 10: "October" }, { 11: "November" }, { 12: "December" }];
                            alert(response);
                        });
                    },

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Filter header box
« Reply #17 on: May 21, 2021, 10:52:28 pm »
Since $.getJSON fetches data from remote serve asynchronously, it can't be used directly in filter.options callback.

Please check this example for loading filter dropdown options dynamically from remote data source:

https://paramquery.com/pro/demos/filter_remote_options