How to 'remove' rows from page record count and total record count??

How to 'remove' rows from page record count and total record count??

burntsausageburntsausage Posts: 9Questions: 0Answers: 0
edited September 2011 in General
I want to be able to have 'header' display rows within the table but not include these in the total record counts.

So ideally I would have something like .... and this would not get included in the count.

I'm fine with jQuery but not sure about javascript objects.

I think I need to add to the table object an attribute called headerRows for example and do something like:

if (nTrs[i].className == "headerRow"){

oSettings.aoData.push({
"headerTr": nTrs[i]
});
}

Then use this to subtract from the actual total figure.

But I''m getting lost in the code and like I say, don't really know what I'm doing with JS ojects!

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    um.. why not put it in the header? (just set bSortCellsTop: true to make sure the top header row is used for the sorting events. http://www.datatables.net/ref#bSortCellsTop)
  • burntsausageburntsausage Posts: 9Questions: 0Answers: 0
    This is the mark-up I'm using





    header 1


    data 1-1


    data 1-2


    header 2


    data 2-1


    data 2-2


    header 3


    data 3-1





    The record count I want to display here is 5, but it will count 8 as there are 8 rows in the table.

    fbas - did you realise I meant multiple header rows?

    I tried substituting for in the headerRows but this gives error 'sdata is undefined'. I set the bSortCellsTop also.
This discussion has been closed.