Adding custom config variables to a server side response...
Adding custom config variables to a server side response...
hb2brandon
Posts: 6Questions: 0Answers: 0
I'm trying to make ColumnFilter pull a list of distinct database values to fill select boxes. Working backwards and search the forums I believe I know what I have to do. (see Allan's 2nd comment here: http://www.datatables.net/forums/discussion/3931/server-side-filtering-on-specific-columns-with-input-and-select/p1)
I'm getting held up on accessing the data I've added. I created an array called 'filterLists' and want to override the data being sent to the select box drawing function if mData is a member of filterLists.
The only part I can't figure out is how to access filterLists once the ajax feed is digested by dataTables. Do I need to declare it somewhere (I've tried but can't access it or find it with a console.log)? What would the syntax be to reference it?
I'm getting held up on accessing the data I've added. I created an array called 'filterLists' and want to override the data being sent to the select box drawing function if mData is a member of filterLists.
The only part I can't figure out is how to access filterLists once the ajax feed is digested by dataTables. Do I need to declare it somewhere (I've tried but can't access it or find it with a console.log)? What would the syntax be to reference it?
This discussion has been closed.
Replies
Allan
Ok... so I can use that when the json response is first parsed to declare/push and fill the variable with a piece of the json response.
Is it not obtainable at all directly? I've pretty much butchered ColumnFilters.js to suit my every need but so far I haven't had to modify the core. Am I wrong or will I have to in order to push my array into an accessible space?
Allan