Custom paging condition - Can we ?
Custom paging condition - Can we ?
Hello all,
Can you help me solve my problem ?
The following is my table
Col1|
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1|
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1|
Col1| Col2| Col3 | Col4
....
I need to apply paging only for the column with colspan=4 (Can we see them like 'Category' rows).
Do you know any feature/plugin to make it ?
Thanks so much
DuongDN
Can you help me solve my problem ?
The following is my table
Col1|
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1|
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1| Col2| Col3 | Col4
Col1|
Col1| Col2| Col3 | Col4
....
I need to apply paging only for the column with colspan=4 (Can we see them like 'Category' rows).
Do you know any feature/plugin to make it ?
Thanks so much
DuongDN
This discussion has been closed.
Replies
You can hack around it like this example: http://datatables.net/release-datatables/examples/advanced_init/row_grouping.html - but that's currently as good as it gets.
Allan
Thank for your response.
I think I make a bad explanation and you misunderstand
Actually, I created this table with colspan in the tbody with following callback
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
var iCol = $(nRow).children('td').length;
if(!aData[1] &&!aData[2] && !aData[3] && !aData[4]){
$(nRow).children('td:gt(0)').css('display', 'none');
$(nRow).children('td:first').attr('colspan', iCol);
}
}
Now I need to make paging on my table based on the rows with cospan=4 (I call them 'Category' rows). I'm looking for the solution for this case. Can you give me a advise ?
DuongDN
Thanks
> Is colspan support in tbody currently on the map for DataTable :)?
Sort of. For grouping content, then yes, in v2. But before that v1.10, 1.11 and 1.12 are planned. So it's a while off!
Allan
I solved my problem with server side paging technique.
Thank for your ideas.
DuongDN