Showing and Hiding Rows

Showing and Hiding Rows

sklonarissklonaris Posts: 2Questions: 2Answers: 0
edited March 2015 in Free community support

I am having trouble doing this. I have tried filtering them using something like this

  $('#table').dataTableExt.afnFiltering.push (oSettings, aData, iDataIndex) ->
    status = aData[3]
    if status == "Live"
      return true
    else
      return false
  $('#table').dataTable().fnDraw();

It worked but then I lose the original data when i clear the filter.

I then tried to just show and hide rows like this

  rows = $('#table').dataTable().fnGetNodes()

  for row in rows
    if (row.cells[3].innerHTML == 'Live')
      row.show()
    else
      row.hide()
  return

But the show and hide methods fail.

Can someone help me come up with a method for this?

This discussion has been closed.