Discover bootstrap editable table row, include the articles, news, trends, analysis and practical advice about bootstrap editable table row on alibabacloud.com
Recently, customers put forward the demand, want to the original management system, do the optimization, through the mobile phone can also be a good show, think of 2 programs:
A scheme: Keep the original page, a new design for the mobile phone page, when the mobile phone access, into the m.zhy.com (Mobile page), PC device Access, into the www.zhy.com (PC page)
Plan B: Adopt bootstrap frame, replace the original page, automatically adapt to mobile phon
. The effect of table data after a row is dragged
4. effect after the second and third dragging
5. Click undo on the right table
6. Click undo multiple times and the table returns to the initial state.
Ii. Sample CodeThe first thing you need to do is look at the Bootstrap
. Delete the foreground data, do not need to reload from the background
Remove params remove data from table, the params contains two properties:
field:the field name of remove rows.
Values:the array of values for rows which should is removed.
..... Lots and lots of things!
A Delete button to delete all the selected events! is not very good!
function Getidselections () {return
$.map ($table
17th Specifies that the server-side mode load data. Line 20th Specifies the type of the query parameter, which can be set to undefined or limit, and different settings can get different parameters in the Queryparams function. The 第23-25 row Gets the page number, the number of records per page, the query criteria, and returns as a parameter to the query. There is only one condition, if you want to query multiple conditions, you can only get multiple c
Bootstrap provides a clear layout for creating tables. The following table lists some of the table elements supported by Bootstrap:
Table classThe following table styles can be used in tables:
The following table's classes a
Recently, customers put forward the demand, want to the original management system, do the optimization, through the mobile phone can also be a good show, think of 2 programs:
A scheme: Keep the original page, a new design for the mobile phone page, when the mobile phone access, into the m.zhy.com (Mobile page), PC device Access, into the www.zhy.com (PC page)
Plan B: Adopt bootstrap frame, replace the original page, automatically adapt to mobile ph
. Introduce js and css
2. table Data Filling
BootStrap table can be used to obtain data. One is to specify the data source through the data-url attribute of table, and the other is to specify the url when initializing the table through JavaScript to obtain data.
...
$('#
Objective
Bootstrap table style, there are similar easyui tables, there are card-type table, put on the mobile side of the display, the same. But Bootstrap's own table is not the operation of the list, a lot of resources on the Internet, but are relatively single, fragmented, JS, CSS also often give the incomplete, on
Bootstrap table common methods (time control, export, dynamic drop-down box, form verification, selection and information retrieval) code sharing, bootstraptable
1. bootstrap-table click a single row to select
$ ('# Gzrwtable '). on ('click-
The grid system of the bootstrap framework works as follows:1. The data row (. Row) must be included in the container (. Container) to give it the appropriate alignment and padding (padding). Such as:2. Columns (. Column) can be added in the row (. Row), but the sum of the c
displayed through ng-repeat. The Code is as follows:
index
{{ x }}
{{ $index + 1 }}
$ Index is the default repeat parameter. The column header of the table is the key value cyclically obtained through the first row of the data source (json. Of course, if Bootstrap wants to specify that the Class of the
?
The general method is to fix the "owner" column and slide only the column behind it.
However, previously this function was encapsulated in the front-end framework, for example, frozen columns in easyui, but it was never used in Bootstrap (it did not provide this)
Write one by yourself ~ There is no idea, and I finally come up with a "non-mainstream" method: using two tables
The table on the left is us
When we design a page, chunking is a must, no site is a column down, unless you are reading a novel, otherwise your page design must be divided, that is, because of multiple panel components, in the bootstrap to the grid system, and in each row of each column for a macro layout, is to build small chunks in each chunk, and small chunks can be implemented using a panel, and here's an example
Thi
many rows are currently selected, select All, and so on
The calling method is syntax: $ (' #table '). Bootstraptable (' method ', parameter);
1 The ID of the currently selected box
getselections none return selected rows, where no record selected, a empty array would return.
2. Select
getallselections None return all selected rows contain search or filter, when no record selected, a empty Arra Y would return.
$
Bootstrap ~ Panel and Table, bootstrappanel
When we design a page, parts are required, and none of the websites are listed in the column. Unless you are reading a novel, your page design must be segmented, that is, it is called to the raster System in bootstrap because of multiple panel components, and after the macro layout of each column in each
The example of this article for everyone to share the use of bootstrap table for your reference, the specific contents are as follows
Bootstrap table Git address:https://github.com/wenzhixin/bootstrap-table
Introducing Files
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.