Datatable tabs with server side processing
Datatable tabs with server side processing
Hi,
I'm working with server side processing and I'm trying to use tabs to allow the user to select different kinds of information. When I tried this example http://www.datatables.net/examples/api/tabs_and_scrolling.html the tabs worked but not as I wanted. First of all, can I do that? or am I crazy for trying ? hahaha.
I have two important problems:
1) As I tried, the code does all the server calls at the same time so if I have 4 tabs, it will do 4 calls and that isn't useful
2) I lost all the functionallity of every table, for example, I'm not able to use the pagination.
Hope I had describe fine my situation, any idea will be useful !.
Cheers,
Pawel.
I'm working with server side processing and I'm trying to use tabs to allow the user to select different kinds of information. When I tried this example http://www.datatables.net/examples/api/tabs_and_scrolling.html the tabs worked but not as I wanted. First of all, can I do that? or am I crazy for trying ? hahaha.
I have two important problems:
1) As I tried, the code does all the server calls at the same time so if I have 4 tabs, it will do 4 calls and that isn't useful
2) I lost all the functionallity of every table, for example, I'm not able to use the pagination.
Hope I had describe fine my situation, any idea will be useful !.
Cheers,
Pawel.
This discussion has been closed.
Replies
2. Sounds like a Javascript error to me? However, I'd look at getting point 1 sorted if it's not first.
Allan
Thanks for replying. About the first problem, I'm working on that and trying to find the event for what I want but I think it isn't too much difficult to change, thanks !. About the second problem, yesterday I resolved the problem with the pagination but I really don´t know how to use the oTable element to set the other functionallity, I mean, before I started to work with the tabs I use the oTable object, for example, like this:
[code]
$('#example tbody td:nth-child(5)').each(function() {
var nTr = this.parentNode;
var aData = oTable.fnGetData(nTr);
var sTitle = aData[8];
this.setAttribute('title', sTitle);
});
[/code]
Now, with the change, is oTable a different kind of object? How can I access it? I was trying something like this to apply the new functionallity to all the tabs:
[code]
$('table.display tbody tr').each(function() {
var nTr = this.parentNode;
var aData = oTable.fnGetData(nTr);
var sTitle = aData[8];
this.setAttribute('title', sTitle);
}
[/code]
The selector works fine and oTable has information but I guess that now is an Array, isn't it?
Cheers,
Pawel.
Allan
Thanks for replying. I will try it after resolve some lovely IE problems haha.
Cheers,
Pawel.