Using Editor's "joined" attributes as part of the filters on the DataTables object
Using Editor's "joined" attributes as part of the filters on the DataTables object
agustin_garciaromero
Posts: 42Questions: 0Answers: 0
Hello,
I have the following JSON object from an Editor's join:
[code]
DT_RowId: "row_1"
customer: "10"
release_id: "4"
project_name: "Project 1"
project_manager: Object { id="6", name="First, Last"}
[/code]
In my screen, I'd have two select buttons used to filter by "release_id" ('projects' table) and by "users.id" (join attribute, based on project's id and manager's id (located in 'project_pm' joining table)
The first filter is plainly applied, being the 'release_id' a 'native' attribute in the DataTables object, e.g.: dtObj.fnFilter(release_id, 0, true);
How do I 'set' the users.id as part of the DataTables attributes to be able to apply filters on it as well? Or,
How can I use dtObj.fnFilter to reach down to project_manager.id attribute?
Hope I'm making my self clear, if required I can share the associated files.
Thanks in advance
I have the following JSON object from an Editor's join:
[code]
DT_RowId: "row_1"
customer: "10"
release_id: "4"
project_name: "Project 1"
project_manager: Object { id="6", name="First, Last"}
[/code]
In my screen, I'd have two select buttons used to filter by "release_id" ('projects' table) and by "users.id" (join attribute, based on project's id and manager's id (located in 'project_pm' joining table)
The first filter is plainly applied, being the 'release_id' a 'native' attribute in the DataTables object, e.g.: dtObj.fnFilter(release_id, 0, true);
How do I 'set' the users.id as part of the DataTables attributes to be able to apply filters on it as well? Or,
How can I use dtObj.fnFilter to reach down to project_manager.id attribute?
Hope I'm making my self clear, if required I can share the associated files.
Thanks in advance
This discussion has been closed.
Replies
Any feedback on this one? Any place to start with?
Regards
If it isn't in a column, then you would need to use a custom filter, as described here: http://datatables.net/development/filtering#row_filters .
Allan