custom buttons for filters in searchPanes

custom buttons for filters in searchPanes

zonemzonem Posts: 2Questions: 0Answers: 0

Hi,

I want to make multiple buttons that have different filter options (defined previously) from searchPanes .

I am trying it using StateRestore and trying to show 2 States using "Predefined" when defining them but it only shows the second one.

http://live.datatables.net/zananamu/4/edit

I have also tried creating each separate button and using the Search method for the columns but, although it works, it does not work for me because I need it to do it with the filters of the searchPanes.
Is there a way for a custom button to select certain filters from the searchPanes?

Either option would really work for me, either StateRestore or custom buttons, but I'd prefer the second.

Thanks!

Replies

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Hi,

    You can't do:

    {
      predefined: {
        ...
      },
      predefined: {
        ...
      }
    }
    

    It would be like doing: var i = 0; i = 1; and expecting it to be both 0 and 1 at the same time. I don't think object order is defined in the Javascript spec (I might be out of date there), but in every implementation I've see, the second definition would "win".

    You need to combine the two together: http://live.datatables.net/zananamu/5/edit .

    Allan

  • zonemzonem Posts: 2Questions: 0Answers: 0

    Thank you Allan.

    Could the buttons be made independent instead of being children of "filters" button?

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Sorry no - not at the moment.

    Allan

Sign In or Register to comment.