Datatable does not work for my project using jquery-ui 1.12 jquery 3.2.1 bootstrap 3
Datatable does not work for my project using jquery-ui 1.12 jquery 3.2.1 bootstrap 3
Using the downloads site i choose:
Styling : Bootstrap 3
Packages: jquery 3 and data tables
Extensions: picked them all
The example is super simple to follow but with the above downloaded i cannot get it to work.
My table looks like a boring normal no style no nice search and filter features table. I think my issue is I dont know what to include in my bundles in bundleconfig. I have tried every combination I can think of and can find in the examples. And still it does not work. I tried the CDN. I tried downloading and inserting into the bundle as the download tab suggests. Still no luck.
With those selections I list above will datatables.min.js and datatables.min.css include everything I need in my bundle or do i need to include datatables.bootstrap.min.js and datatables.bootstrap.min.css and datatables.jquery.min.css and js. Ive tried several combinations and placing them in various orders above, below and in between of jquery, bootstrap bundles and it is not working.
Scripts.js rendered in my layout just like the super simple example:
$(function ()
{ $("example").DataTable();});
My table in my cshtml just like the super simple example. copied exactly so I wont include all here
<
table id="example" class="display" cellspacing = "0" width="100%">
<thead>
<tr>...
Im sort of new to this and will appreciate your kind reply.
Answers
That class is for regular tables, not bootstrap styled tables. Change class="display" to class="table table-striped table-bordered" as shown https://datatables.net/examples/styling/bootstrap.html
Thank you bindrid! You fixed it.