"All" as an option for individual column filtering (using select menus)
"All" as an option for individual column filtering (using select menus)
I would like to have "All" listed ast the default select option instead of NULL as seen here:
http://datatables.net/release-datatables/examples/api/multi_filter_select.html
I see this as a 2 step process. First is creating "All" as an option for the select menu. Second I need to set the value of "All" = NULL.
being the current default.
Creating "All" as an option for the select menu is easily done with the following code:
[code]
function fnCreateSelect( aData ){
var r='', i, iLen=aData.length;
for ( i=0 ; i
http://datatables.net/release-datatables/examples/api/multi_filter_select.html
I see this as a 2 step process. First is creating "All" as an option for the select menu. Second I need to set the value of "All" = NULL.
being the current default.
Creating "All" as an option for the select menu is easily done with the following code:
[code]
function fnCreateSelect( aData ){
var r='', i, iLen=aData.length;
for ( i=0 ; i
This discussion has been closed.
Replies
Allan
Yes, I did mean the "empty String."
The reason that I referred to it as "NULL" was because I was not able to trace the code to see the "empty String."
I guess my question is where is the "empty String" so that I can put "All" in it as you suggest?
[code] function fnCreateSelect( aData ){
var r='', i, iLen=aData.length;
for ( i=1 ; i
> var r='All'
If that doesn't work, please link to a test case showing the issue.
Allan
Thank you again. I was SO CLOSE!!!
As you can see from my code, I was putting "All" as the value when I should have put it as the text for the option tag.
DataTables takes the value of the "empty string" to display all of the values in the column. By default DataTables has no text for the for the option where the value is the "empty string."
I hope that my question helps others.
You may want to consider making "All" the default text for the option tag.
Again I can only say, "Doh!"