Filter by inline text

Filter by inline text

ajaxboyajaxboy Posts: 17Questions: 0Answers: 0
edited February 2014 in General
There might already be something that can do this, so I wanted to see


I need to implement a sort of filtering feature that takes into account, a category (which is not in any of the columns), so I thought if I put the category name inline, so I could apply a filter, and look for that, then search for the text,

Is there anything like that already?, I was curious

I know there is this one:
http://datatables.net/development/filtering

Which is broad and can perhaps allow me to do what I need by just filtering the searchable string, is there a off the shelf /built in way I could get the inline property from the tr or td (or anywhere) though?, so I could specify a category and pre filter that.

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Possibly you could put it in a hidden column? You could implement a custom filter, but if a hidden column will do it for you, then that will be easier.

    Allan
  • ajaxboyajaxboy Posts: 17Questions: 0Answers: 0
    edited February 2014
    Yes, that is what I thought of in the beginning, but my friend here thought it was kind of dirty (he is very picky with code) ... so I was looking for alternatives, I'll see what I can come up with

    If the row was passed in function (oSettings, aData, iDataIndex) (which it dont) , it would make it easy to access the inline property, making it really easy, another way is to just filter one of the columns that could have a a hidden text which would have the category in it, but i dont know if that would be a good way to do it
This discussion has been closed.