Disabling search for some rows

Disabling search for some rows

thamtham Posts: 3Questions: 0Answers: 0
edited December 2013 in General
Hi,

I have a datatable whose first cell in each row is a checkbox. When filtering the table, I want the rows where this checkbox is checked to be sticky and filter only the rest of the rows. In other words, when the user searches something, the results should display the checked rows AND the actual filtered rows.

How can I do this?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Its not possible to disable search for some rows - all rows are treated equally in DataTables, but it can be done for columns using bSearchable .

    Allan
  • thamtham Posts: 3Questions: 0Answers: 0
    I see. So it would take hacking into the datatables source if this needs to be done?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I think the closest you'd get to it in DataTables to implement custom filter: http://datatables.net/development/filtering - which in fairness, does make it possible, but you wouldn't be able to use the built in filtering options. Other than that, then yes, you'd need to hack the core.

    Allan
  • thamtham Posts: 3Questions: 0Answers: 0
    Thanks!
This discussion has been closed.