Multiple tables with different number of columns

Multiple tables with different number of columns

fluctu8fluctu8 Posts: 1Questions: 1Answers: 0

Hello,

I'm having trouble getting "datatables" to work correctly with multiple tables on one page.
I'm using Asp.net MVC, and at the moment I have 2 tables created, rows are referenced from the database and run through foreach loops, and the columns for both tables are based on what role the user is in when he views this webpage (First table has 8 columns if they're logged in as an administrator, 7 for anyone else. Second table has 10 columns as an administrator, 9 for anyone else).

Although the sort buttons and search bar render for both tables, they only work correctly for the second table, on the first table they lack functionality.

Does anyone have an idea what's going on?

This discussion has been closed.