twitter-bootstrap 使用引导程序进行分页的响应式数据表或表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21424471/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 19:52:15  来源:igfitidea点击:

Responsive datatable or table with pagination using bootstrap

javascriptjqueryasp.net-mvctwitter-bootstrapjquery-datatables

提问by Brendan Vogt

I'm looking for some sample code on how to implement a datatable/table with pagination keeping responsive in mind. I am using ASP.NET MVC.

我正在寻找一些关于如何使用分页实现数据表/表并记住响应的示例代码。我正在使用 ASP.NET MVC。

Has anyone had experience with Bootstrap 3 and jQuery Datatables? Do the 2 play along well? And with regards to being a responsive datatable? This question isn't related to just Bootstrap and jQuery datatables but it is the only decent datatable that I have worked with.

有没有人使用过 Bootstrap 3 和 jQuery 数据表?两人玩得好吗?关于成为响应式数据表?这个问题不仅仅与 Bootstrap 和 jQuery 数据表有关,但它是我使用过的唯一合适的数据表。

The reason why I ask is because I need a responsive datatable or normal table with pagination and sorting.

我问的原因是因为我需要一个具有分页和排序功能的响应式数据表或普通表。

采纳答案by Jakotheshadows

I haven't gone as far as making a "responsive" datatable with bootstrap, but the two certainly can be used together.

我还没有使用引导程序制作“响应式”数据表,但两者当然可以一起使用。

Check out this link: http://datatables.net/blog/Twitter_Bootstrap_2and keep in mind the article is for Bootstrap 2. For Bootstrap 3, you will need to refer to http://getbootstrap.com/getting-started/#migrationas some class names have changed between Bootstrap 2 and 3. It shouldn't be too difficult from there, if you're familiar enough with Bootstrap, to get a responsive datatable.

查看此链接:http: //datatables.net/blog/Twitter_Bootstrap_2并记住该文章适用于 Bootstrap 2。对于 Bootstrap 3,您需要参考http://getbootstrap.com/getting-started/#迁移,因为某些类名在 Bootstrap 2 和 3 之间发生了变化。如果您对 Bootstrap 足够熟悉,那么从那里获取响应数据表应该不会太困难。

Edit: Allan also has some Bootstrap 3 integration files already whipped up here.

编辑:阿伦也有一定的引导3集成文件已经刮起了这里