Hiding specific rows when page loads

Hiding specific rows when page loads

sameer_citplsameer_citpl Posts: 1Questions: 0Answers: 0
edited July 2012 in General
Hi ,
This issue might be posted earlier , but i could not find it .
I am new to datatable and i do not know how to achieve the following

I have the following table (for example)


1abc


2pqrBYO


3xyz



My requirement is :
1) when page load , the whole row needs to be hidden if last TD has "BYO" value

2) when clicked on checkbox (which is on the top of table ), these hidden rows needs to displayed along .

3) Needs reflect the count in "Comparing 1 to 10 of 10 Mobile Broadband Plans"

Replies

  • cjp2yfcjp2yf Posts: 5Questions: 0Answers: 0
    You'll probably want to use fnCreatedRow for your first requirement. Maybe something along the lines of:
    [code]
    "fnCreatedRow": function (nRow, aData) {
    if (aData[lastTD] == 'BYO') {
    $('td', nRow).parent().css('display', 'none');
    }
    }
    [/code]
This discussion has been closed.