-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filter Data with bVisible=false #16
Comments
Haven't tried my plugin with bVisible=false, will check it out... |
Looks a bit tricky, will take some time... so let me know if you still interested, eventually you will have to use {column_number : 2} if you want to use and filter the Spalte2 column (it will place the filter in the Spalte2 column. |
many thanks for an answer. Your suggestion will run into problems when you like to add a filter for the last column if you have "bVisible=false" columns. |
If for example you want to display the filter for Spalte6 you will use {column_number : 6} , and if you will use "bVisible=false" on Spalte7 , there will be no point in calling {column_number : 7} or in general there is no point in calling {column_number : XXX} where XXX refers to a "bVisible=false" column (unless the filter going to be located in external container) |
Done and added to 0.4.6, grab it from master : https://github.com/vedmack/yadcf/blob/master/jquery.dataTables.yadcf.js or from https://github.com/vedmack/yadcf/releases/tag/0.4.6 In your specific example, if you want to show filter for Splate2 column use {column_number : 2} , in general the column number should refer to the relevant column in datatables (bVisible=false still counts a column) |
Filter works fine if you have only "Datatables" bVisible=true columns.
If there are bVisible=false columns included the datasource shown in Filter will be not from the column where the filter element is located.
Example:
var userTable=$('#myDataTables').dataTable({
/* Spalte0 / { "bSearchable": false,
"bVisible": false },
/ Spalte1 / { "bSearchable": false,
"bVisible": false },
/ Spalte2 / null,
/ Spalte3 / null,
/ Spalte4 / null,
/ Spalte5 / null,
/ Spalte6 / null,
/ Spalte7 */ null
]
}).yadcf([
{column_number : 0}, // shows filter in "Spalte2" and uses datasource for filter from "Spalte0"
{column_number : 2} // shows filter in "Spalte4" and uses datasource for filter from "Spalte2"
]) ;
How can a show the datasource from it's own column ?
The text was updated successfully, but these errors were encountered: