Create Tabs with Different Views in DataTable
Create Tabs with Different Views in DataTable
zgoforth
Posts: 493Questions: 98Answers: 2
Hello, I know this isn't a "proper question" but I am very curious. I have created a DataTable before but was unsure if this is a possible feature or not. I am trying to make a leaderboard, that will have the columns Name | Weight % | Steps | Minutes. I also want to have Name | Weekly Weight % | Weekly Steps | Weekly Minutes. Is there a way to achieve tabs or two different views without compiling all of this mess into one data table or having to make another one?
This discussion has been closed.
Answers
This example from this thread shows how to create BS4 tabs,
Colin
@colin Thank you so much!
@colin One more question, all I see in relevance to dynamic data to populate the DataTable is AJAX, I am assuming fetch is supported correct?
Not sure what you mean by fetch but the supported data sources is documented here. You can see examples of each here.
Kevin
@kthorngren Fetch API, I have started to use this instead of AJAX
Sure, just use
rows.add()
or initialize the Datatable and usedata
in the fetch API's success callback to populate the Datatable. If you are using it with Datatables now then Tabs wont change how it works.Kevin
@kthorngren thank you. I am going to make a new question on clarification of a different subject but related to this tabbed table.