Hi there,
I'm using datatables for displaying rows from a database. Now, I want to allow the user to be able to toggle between displaying active and inactive rows. I'm using bootstrap toggle for this. When the page loads, I see 10 rows per page - these rows can either be "active" or "inactive accounts depending on what the database returns. When the user clicks on "Show active accounts", I'm making all rows with the class"inactive" as hidden. Now, the problem is that this does not then show me 10 active rows, but instead only shows those rows on the table which have class "active". So, for eample if there are 10 row on a page - 6 active accounts and 4 inactive accounts - clicking on show active accounts only shows me 6 active accounts, instead of taking 10 accounts which are active and then displaying them. I understand that the reason this is happening is because I am simply hiding the rows. I tried redrawing the table but that doesn't work. Is there a way I can use a row toggle feature in datatables, or is there a way to integrate bootstrap toggle and datatables? I went through some of the posts which deal with bootstrap toggle but they don't specifically answer my issue.
- Deepak