The use of DataTables

Source: Internet
Author: User

Original address: http://blog.csdn.net/mickey_miki/article/details/8240477

1, the default configuration of DataTables

$ (document). Ready (function () {
$ (' #id名 '). dataTable ();
} );

2. Some basic property configuration of DataTables

"Bpaginate": true,//page turn function
"Blengthchange": true,//change the number of data displayed per page
"Bfilter": true,//filter function
"Bsort": false,//Sort function
"Binfo": true,//footer Information
"Bautowidth": true//automatic width

Property name

Value limitation

Statement

Bautowidth

True or FALSE, default True

Whether to actively draw the table column width

Bdeferrender

True or FALSE, default false

A parameter for the liner

Bfilter

True or FALSE, default True

Switch, whether the client filtering feature is enabled

Binfo

True or FALSE, default True

switch, whether to display some information about the table

Bjqueryui

True or FALSE, default false

Whether to apply the jquery UI Themeroller style

Blengthchange

True or FALSE, default True

switch, whether to display a selection bar for each page length (requires a pager support)

Bpaginate

True or FALSE, default True

switch, whether to display (apply) the paging device

Bprocessing

True or FALSE, Defualt false

Switch to specify whether the "processing penalty" message is displayed when the penalty data is being processed

Bscrollinfinite

True or FALSE, default false

Switches to specify whether an infinite migration transition (in conjunction with sscrolly) is effective in large data volumes. When this mark is true, the pager is closed by default

Bsort

True or FALSE, default True

Switch, do you want columns to have sort by column function

Bsortclasses

True or FALSE, default True

Switch that specifies whether to grow classes "" sorting_1 "" "" "" "" Sorting_2 "" "and" "Sorting_3" when the current column is sorted, when it is opened, the function is lost when processing the penalty big data.

Bstatesave

True or FALSE, default false

Switch, whether to turn on the client state logging feature. This data is recorded in the cookie, after you open the record, even if you refresh the page, or open the browser from the beginning, the previous situation is saved.

Sscrollx

"Disabled" "or?" "" 100% ""? Similar string

Whether to turn on degree migration transitions and specify the size of the migration transition area

Sscrolly

"" "Disabled" "or" "200px" "? Similar string

Whether to turn on a vertical migration transition and specify the size of the migration transition area

--

--

--

Options

?

?

Aasorting

Array array[int,string], such as [], [[0, "" ASC "], [0," "desc" "]]

Specifies the basis for sorting by multiple columns of data

Aasortingfixed

Ditto

Ditto. The only point is not to be the user's custom device conflict

Alengthmenu

Default [10, 25, 50, 100], can be considered as a one-dimensional array, can also be a two-dimensional array, such as: [[Ten,, 1,-+], [ten, A, +, "all"]]

This is to select the number of entries per page, when applying a two-dimensional array, the two-dimensional plane can only have two elements, the first is the option to display the number of entries per page, and the second is a statement about these options

Aosearchcols

Default NULL, similar to: [NULL, {"Ssearch": "My Filter"}, null,{"Ssearch": "^[0-9]", "Bescaperegex": false}]

Define the characteristics of the initial loot list for each column 0 (this piece is not yet understood)

Asstripclasses

default ["" "Odd" "," "even" "], for example [" "" Strip1 "", "" Strip2 "", "" STRIP3 ""]

Specifies the class style to be applied to each row, and the active reincarnation

Bdestroy

True or FALSE, default false

Used to erase the previous data object when it is time to perform a new DataTable binding on the same element, swapping the new object settings

Bretrieve

True or FALSE, default false

Used to indicate whether a DataTable object is returned when a DataTable binding is fulfilled

Bscrollcollapse

True or FALSE, default false

Specify the appropriate time to shrink the migration transition view

Bsortcellstop

True or FALSE, default false

(Unknown stuff)

Icookieduration

Integer, default 7200, in seconds

Specifies the length of time that is used to store client information into a cookie, after which the active expiration is crossed

Ideferloading

Integer, default is null

Delay load, its parameters are to load the number of targets, generally with bserverside,sajaxsource and other common applications

Idisplaylength

Integer, default = 10

To specify the number of bars to display on a screen, turn on the paging device

Idisplaystart

Integer, default = 0

Used to specify from which data to start display in the table

Iscrollloadgap

Integer, default = 100

Lets you specify a maximum of one screen of data to display when the DataTable is set to a migration transition

OSearch

Default {"Ssearch": "", "Bregex": false, "Bsmart": true}

The initial time to specify the parameters of the coherent, a little jumbled, do not understand the present

Sajaxdataprop

String, default "" Aadata ""

Specifies the name of the data item to be applied when the table data is fetched from the server

Sajaxsource

URL string, default null

Specify which URL to fetch data from

Scookieprefix

String, default "" Sprymedia_datatables_ ""

Used to specify the prefix name of the string stored in the cookie when the health store feature is opened

Sdom

Default Lfrtip (when Bjqueryui was false) or < "H" lfr>t< "F" ip> (when Bjqueryui is true)

This is a powerful attribute for defining a DataTable layout, and another special document to add to the statement.

Spaginationtype

"Full_numbers" "or" "Two_button" ", Default" "Two_button" "

Used to specify the style of the page selector

Sscrollxinner

String Default "" Disabled ""

It's the extent of the shift, and it doesn't make sense.

How to use DataTables

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.