Reputation: 61
I'm trying to use the DataTable plugin for TableTools.ShowSelectedOnly, but I have difficulties to make it works. Relative plugin page : TableTools.ShowSelectedOnly
I use Example given in the plugin documentation :
- for the selection : it works good.
But I don't see button for Show all
or Show Selected
?
Actually, I don't understand where the box contained oFilterSelectedOptions
appears ?
(describe as "select box to show all or only selected items" in the plugin)
I probably missed some basic instruction... but I'm neewbie on javascript.
Did some one could help me ?
Here is my test code : http://jsfiddle.net/K5g9q/
Upvotes: 3
Views: 721
Reputation: 61
Finnaly I found solution !
There is a little mistake in the example , you should use the sDom
option O
.
So, the good example is :
$(document).ready(function () {
$('#example').dataTable({
"sDom": 'T<"clear">OSrtip',
"oTableTools": {
"sRowSelect": "multi",
},
"oLanguage": {
"oFilterSelectedOptions": {
AllText: "All Row",
SelectedText: "Selected Row"
}
}
});
});
Then adjust the dom positionning if you want.
Edit of jsfiddle with working example : http://jsfiddle.net/K5g9q/3/
Hope it helps.
Upvotes: 3