Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Datatable initialization issue with partial view inside bootstrap nav-tabs

$
0
0

Hello,

I am using jquery DataTable styles for tables in my .Net MVC application. its working fine in a normal page. It applies all styles like pagination, sort icons, search box etc. but it is giving issue in a popup. When I am trying to apply the same style for tables inside partial view loaded inside bootstrap tabs it doesn;t work.. or sometimes it applies the style but next time it gets disappeared.
I have four tabs(bootstrap tabs) in my MVC view and each tab loads a different partial view to display list of items in tabular format. I am reinitializing the tables as DAtatable in all the tabs/partial views on Tab change event but its not working. When it loads the partial view on the selected tab, table does not show pagination, sort and search features. this is making the user difficult to sort the table or search any item. I also tried adding the initialization code in tab bs-shown event and partial view bs-shown event but nothing is worked. However it works for the first/default visible tab as it gets loaded on main view load. But when I switch tabs it doesn't work.

Please suggest how to fix it? how can I handle it. I want the DataTable inside partial view to be initialized every time on tab change

Thanks in advance


Viewing all articles
Browse latest Browse all 2364

Trending Articles