简体   繁体   English

数据表,如何更改外观

[英]Datatables, how to change appearance

How you can see i use datatables to style my tables: 您如何看待我使用数据表来设置表格样式:

在此处输入图片说明 What disturbs me is first , that the plugin adds an line above my table: 首先困扰我的是,该插件在我的表格上方添加了一行:

Showing 1  to 14 of 14 entries

How do i have to cahnge my code, so that this wont be displayed anymore? 我该如何取消我的代码,以便不再显示该代码?

Next problem is that i styled my rows with backgound-colors, but how you can see when i press on one of the headings for example "typ", datatables overwrites my colors with the standard blue tones! 下一个问题是我使用背景色设置了行的样式,但是当我按下诸如“ typ”这样的标题之一时,如何看到数据表会用标准的蓝色调覆盖我的颜色!

My code: Thanks to all! 我的代码:谢谢大家!

 jQuery ->
$('#treatment').dataTable
"bPaginate": false,
"sScrollY": "400px",
    "bScrollCollapse": true

Firstly, in order to remove the 'entries' info, you must add the option 'bInfo' with the value of 'false': 首先,为了删除“条目”信息,您必须添加值为“ false”的选项“ bInfo”:

jQuery ->
$('#treatment').dataTable
    "bPaginate": false,
    "sScrollY": "400px",
    "bScrollCollapse": true,
    "bInfo": false // to disable the entries info.

Its always a good idea to read the documentation . 阅读文档始终是个好主意。

Lastly, given you have not given a complete reproduction of your experienced problem, the following is a shot in the dark based on the limited information provided; 最后,鉴于您还没有完全再现您遇到的问题,因此,以下是基于所提供的有限信息的黑暗镜头;

You may wish to modify/add the css classes to your own css file that is included last in the document, tr.odd.gradeA td.sorting_1 and tr.even.gradeA td.sorting_1 . 您可能希望将css类修改/添加到文档最后包含的自己的css文件tr.odd.gradeA td.sorting_1tr.even.gradeA td.sorting_1

Always remember to inspect the elements with your browser's development tools, which would allow you to see which classes you need to modify, and which options to search for in the documentation. 始终记得使用浏览器的开发工具检查元素,这将使您看到需要修改的类以及在文档中搜索的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM