Bootstrap Table Chinese document (full translation) (reprint) __bootstrap

Source: Internet
Author: User
Table Parameters:
name label type default Description
- Data-toggle String ' Table ' Enable the table directly without writing JavaScript.
Classes Data-classes String ' Table Table-hover ' The class name of the table. By default, the table has a border, and you can add ' table-no-bordered ' to remove the table's border style.
Sortclass Data-sort-class String Undefined The class name of the TD tag being sorted
Height Data-height Number Undefined Define the height of the table.
Undefinedtext Data-undefined-text String ‘-‘ The character displayed when the data is undefined
Striped data-striped Boolean False Set to True will have interlacing effect
Sortname Data-sort-name String Undefined Define row sequence, get data by URL to fill in field name, otherwise fill in subscript
SortOrder Data-sort-order String ' ASC ' Define sort by ' ASC ' or ' desc '
Sortstable Data-sort-stable Boolean False Set to True to get a stable sort, we will add the _position property to the row data.
Iconsprefix Data-icons-prefix String ' Glyphicon ' Define the Font library (' Glyphicon ' or ' FA ' for fontawesome), use the ' FA ' to reference Fontawesome, and implement the effect with the Icons property
Glyphicon integrated in bootstrap can be used for free reference: http://glyphicons.com/
Fontawesome Reference: http://fortawesome.github.io/
Icons Data-icons Object {
Paginationswitchdown: ' Glyphicon-collapse-down icon-chevron-down ',
Paginationswitchup: ' glyphicon-collapse-up icon-chevron-up ',
Refresh: ' Glyphicon-refresh Icon-refresh '
Toggle: ' Glyphicon-list-alt icon-list-alt '
Columns: ' glyphicon-th icon-th '
Detailopen: ' Glyphicon-plus icon-plus '
Detailclose: ' Glyphicon-minus icon-minus '
}
Custom icon
Columns - Array [] Column configuration items, see the column parameter table for more information.
Data - Array [] Load JSON-formatted data
Ajax Data-ajax Function Undefined Custom Ajax methods that require the JQuery Ajax API to be implemented
Method Data-method String ' Get ' Server data request way ' get ' or ' post '
Url Data-url String Undefined Load address of server data
Cache Data-cache Boolean True Set to True disables AJAX data caching
ContentType Data-content-type String ' Application/json ' Data encoding type sent to the server
DataType Data-data-type String ' JSON ' Data types returned by the server
Ajaxoptions Data-ajax-options Object {} Additional parameters when submitting an AJAX request, see Http://api.jquery.com/jQuery.ajax for available parameter columns.
Queryparams Data-query-params Function function (params) {
return params;
}
When requesting server data, you can add additional parameters by overriding the parameters, such as toolbar in the Queryparamstype = ' limit ', the return parameter must contain
Limit, offset, search, sort, order otherwise, you need to include:
PageSize, PageNumber, SearchText, Sortname, SortOrder.
Returning false will terminate the request
Queryparamstype Data-query-params-type String ' Limit ' Set to ' limit ' will send parameters that conform to the RESTFul format.
ResponseHandler Data-response-handler Function Function (res) {
return res;
}
A handler that is used to format data before the server data is loaded.
Parameter: RES is the data requested from the server.
Pagination Data-pagination Boolean False True to display the page bar at the bottom of the table
Paginationloop Data-pagination-loop Boolean True Set to True enables the paging bar to function indefinitely.
Onlyinfopagination Data-only-info-pagination Boolean False Set to True to display only the total number of data, not the page-splitting button. Need to pagination= ' True '
Sidepagination Data-side-pagination String ' Client ' Set where to page, optional value is ' client ' or ' server '. When setting ' server ', you must set the server data address (URL) or override the Ajax method
PageNumber Data-page-number Number 1 If you set up pagination, first page number
PageSize Data-page-size Number 10 If you set up pagination, the number of page data bars
PageList Data-page-list Array [A, M, all] Sets the number of page data bars to select if paging is set. Set to all to display all records.
Selectitemname Data-select-item-name String ' Btselectitem ' Field name for radio or checkbox
Smartdisplay Data-smart-display Boolean True Set to true to quickly toggle between paging and card views
Escape Data-escape Boolean False Escape HTML strings, replacing the ampersand, ', ', ', ', ', ', and ' characters.
Search Data-search Boolean False Whether to enable the search box
Searchonenterkey Data-search-on-enter-key Boolean False When set to True, press ENTER to trigger the search method, otherwise automatically trigger the search method
Strictsearch Data-strict-search Boolean False Set to true enable full match search, otherwise fuzzy search
SearchText Data-search-text String Initialize search text
Searchtimeout Data-search-time-out Number 500 Set the search timeout time
Trimonsearch Data-trim-on-search Boolean True Set to True to allow null character search
Showheader Data-show-header Boolean True Whether to display column headers
Showfooter Data-show-footer Boolean False Whether to show column feet
Showcolumns Data-show-columns Boolean False Whether to display the Content column Drop-down box
Showrefresh Data-show-refresh Boolean False Whether to show the refresh button
Showtoggle Data-show-toggle Boolean False Show toggle attempt (Table/card) button
Showpaginationswitch Data-show-pagination-switch Boolean False Whether to display the Data Bar number selection box
Minimumcountcolumns Data-minimum-count-columns Number 1 When the number of columns is less than this value, the Content column Drop-down box is hidden.
IDfield Data-id-field String Undefined Specify PRIMARY key columns
UniqueId Data-unique-id String Undefined Specify a unique identifier for each row
CardView Data-card-view Boolean False True to display the card view, which is suitable for mobile devices. Otherwise for table attempt, apply to PC
DetailView Data-detail-view Boolean False Set to True to display verbose page mode.
Detailformatter Data-detail-formatter Function function (index, row) {
Return ";
}
A view that formats detailed page patterns.
Searchalign Data-search-align String ' Right ' Specifies the position of the search box in the horizontal direction. ' Left ' or ' right '
Buttonsalign Data-buttons-align String ' Right ' Specifies the position of the button's horizontal orientation. ' Left ' or ' right '
Toolbaralign Data-toolbar-align String ' Left ' Specifies the position of the toolbar horizontal direction. ' Left ' or ' right '
Paginationvalign Data-pagination-v-align String ' Bottom ' Specifies the position of the paging bar in the vertical direction. ' Top ' or ' bottom ' or ' bonth '
Paginationhalign Data-pagination-h-align String ' Right ' Specifies the position of the page bar in the horizontal direction. ' Left ' or ' right '
Paginationdetailhalign Data-pagination-detail-h-align String ' Left ' Specifies the position of the paging details in the horizontal direction. ' Left ' or ' right '
Paginationpretext Data-pagination-pre-text String ' < ' Specifies the icon or text of the previous-page button in the page bar
Paginationnexttext Data-pagination-next-text String ' > ' Specifies the icon or text for the next-page button in a page bar
Clicktoselect Data-click-to-select Boolean False Set true to automatically select Rediobox and checkbox when a row is clicked
Singleselect Data-single-select Boolean False Setting true will prevent multiple selections
Toolbar Data-toolbar String Undefined A jquery selector that indicates a custom toolbar for example:
#toolbar,. toolbar.
Checkboxheader Data-checkbox-header Boolean True Set false to hide the Check-all checkbox in the column header.
maintainselected data-maintain-selected Boolean False Set to True when you click the Paging button or search button, you will remember the checkbox's selection
Sortable Data-sortable Boolean True Set to False to prevent sorting of all columns
Silentsort Data-silent-sort Boolean True Set to False to automatically remember the sort items when you click the page-paging button. Takes effect only when Sidepagination is set to server.
RowStyle Data-row-style Function function (Row,index) {
return class;
}
Custom row style parameters are:
Row: Line data
Index: Line subscript
The return value can be class or CSS
Rowattributes Data-row-attributes Function function (Row,index) {
return attributes;
}
Custom row Property parameters are:
Row: Line data
Index: Line subscript
The return value can support all custom attributes for class or CSS
Customsearch Data-custom-search Function $.noop To perform a custom search rather than a built-in search function, you need a parameter:
Text: Searching for texts
Such as:
            function Customsearch (text) {
                //search logic here.
                You are must use ' this.data ' array in order to filter the data. NO use ' This.options.data '.
            }
            
Customsort Data-custom-sort Function $.noop To perform a custom sort function instead of a built-in sort function, you need two parameters:
Sortname: Sort Name
SortOrder: Sort order
Such as:
            function Customsort (sortname, SortOrder) {
                //sort logic here.
                You are must use ' this.data ' array in order to sort the data. NO use ' This.options.data '.
            }
            
Column Parameters:
name label type default Description
Radio Data-radio Boolean False Whether to display a single election radio
CheckBox Data-checkbox Boolean False Whether to display multiple-selection checkbox
Field Data-field String Undefined The parameter name of the data that the column maps
Title Data-title String Undefined Table header names for this column
Titletooltip Data-title-tooltip String Undefined Title hint text for this list header
Class Class/data-class String Undefined The class of the column
RowSpan Rowspan/data-rowspan Number Undefined Define how many rows to merge when you merge cells
colspan Colspan/data-colspan Number Undefined Define how many columns to merge when you merge cells
Align Data-align String Undefined Set how the column data is aligned, ' left ', ' right ', ' center '
HAlign Data-halign String Undefined Table header alignment, ' left ', ' right ', ' center '
Falign Data-falign String Undefined Table footer Alignment, ' left ', ' right ', ' center '
valign Data-valign String Undefined Cell alignment. ' Top ', ' Middle ', ' bottom '
Width Data-width Number {Pixels or percentage} Undefined Column width, you can use pixels or percentages, without units, the default is PX

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.