bootstrap-table
bootstrap-table copied to clipboard
4 questions
Description
I have been using datatables, but just found this Bootstrap addon and it was very simple to create my first table, similar to what I had before. A few things:
- Can I alternate rows colors like the default layout on datatables?
- When hiding a column using data-visible="false" the right table border seems to disappear
- I have a column with numbers of which some have a ~ in front of it. Is it possible to sort by the value skipping the ~ ?
- Is it possible to hide "Showing 1 to 10 of 800 rows per page" (pagination-info) without the use of CSS?
Example(s)
No response
-
You can use the
rowStyle
option orcellStyle
column option. https://examples.bootstrap-table.com/#options/row-style.htm https://examples.bootstrap-table.com/index.html#column-options/cell-style.html -
Didn't find the problem you said: https://examples.bootstrap-table.com/index.html#column-options/visible.html
-
You can use the
sorter
column: https://examples.bootstrap-table.com/index.html#column-options/sorter.html -
https://bootstrap-table.com/docs/api/table-options/#paginationparts
Solved 1 by adding the table-striped class to the table: https://www.w3schools.com/bootstrap/bootstrap_tables.asp
I will have to look into 2, it keeps removing the right border for me. This example also seems to remove it: https://live.bootstrap-table.com/example/welcomes/from-html.html
Solved 3 using the example, thanks.
Is 4 possible without Javascript? Except for the "sorter" I have been able to go without for all other options. If not, I'll just hide it using CSS.
Is 4 possible without Javascript?
Yes: https://live.bootstrap-table.com/code/wenzhixin/17458
Cheers. 2 remains though.
Please provide an Online Example to show your problem. Thanks!
Right border gone: https://live.bootstrap-table.com/code/vespino/17459
Right border not gone: https://live.bootstrap-table.com/code/vespino/17460
I am using Chrome for the test.
Firefox:
Then it must be a Firefox issue, because that is the browser I'm using. When opening 17460 I need to resize the result pane before the right border appears. This in both Firefox and Chrome.
17460 works fine for me, without resizing anything.