Is there a way in Data Tables to create views via the clicking of a button?
Is there a way in Data Tables to create views via the clicking of a button?
![Barewench](https://secure.gravatar.com/avatar/51c0286359294d4a910be6e326a9efd6/?default=https%3A%2F%2Fvanillicon.com%2F51c0286359294d4a910be6e326a9efd6_200.png&rating=g&size=120)
Hi All,
For some more context basically what I'm trying to do is have a sidebar with buttons that once clicked presents a specific view based on the parameters of that button i.e Example 1 displays all data that has Example 1 in a specific column replacing the current table. I've got a couple ideas about how to achieve this but don't want to create a solution if one already exists.
I've read through the forums but haven't found anything quite like, what I am trying to achieve.
Any help/direction would be greatly appreciated.
Thank you
Answers
Hi @Barewench ,
The easiest way to do this is to use the Buttons extension, there you can make custom buttons to do as you please. If you already have a buttons 'framework', then you could simply do an
onclick
on those buttons and call the DataTables API with something likecolumn().search()
in your example above.Cheers,
Colin