Adding a "select" filter in the toolbar
Adding a "select" filter in the toolbar
Hi, i'm a newbie of datatables ;) I'm trying and learning how to use this powerful tool.
I have to render a simple table with 2 columns: Name, Salary.
On the db table i have 3 columns: Name, Salary, Year and i'm using ajax to request/response the data.
What i want to do is put a select in the toolbar to use for insert a custom parameter in the ajax call. I looked that is can be achieved by using data and dataSrc option in the ajax call.
In the response i insert a json parameter: "YearFilter" example: "YearFilter": {0:[2013] 1:[2014, selected]}
But how can i drow a custom toolbar inserting only a centered select for the year ad populate it with the parameter "YearFilter" contained in the ajax response ?
Thanks.