Need to add info rows

Need to add info rows

char_boychar_boy Posts: 1Questions: 1Answers: 0

When the table first opens in default order, I want to insert some info rows that span all columns, like in the beige rows in the folowing screenshot.

Then if the user enters something into the search box so that it reorders the rows, these info rows shoud disappear. They should only display when rows are in default order.
But when I add any rows to the table using "colspan" it breaks the functionality completely, no search box appears, no sorting, etc.
Is there a version of the datatables that has the ability to do this? Or will I have to hack the code to make it work?
Any info is greatly appreciated, thank you.

Answers

  • rf1234rf1234 Posts: 2,999Questions: 87Answers: 421

    Is there a version of the datatables that has the ability to do this? Or will I have to hack the code to make it work?

    Please post the errors you see on the console. Please also post a test case, link to a page showing the issue or - if that's not possible - post your code.

  • kthorngrenkthorngren Posts: 21,342Questions: 26Answers: 4,954

    But when I add any rows to the table using "colspan" it breaks the functionality completely, no search box appears, no sorting, etc.

    Datatables doesn't support colspan in the tbody. See the HTML requirements for more info.

    The data, like Graded Single, where does it come from?

    The RowGroup extension might handle this nicely for you. You can enable or disable the RowGroup using an API rowGroup().enable() or rowGroup().disable(). In the -even order event you can determine the current order and enable or disable as appropriate.

    Kevin

Sign In or Register to comment.