Home > front end >  Ajax binding bootstrapTable table display
Ajax binding bootstrapTable table display

Time:11-20


As shown in figure I didn't give the style don't know what's the matter became blue


This is a code block
$(" # userTable "). BootstrapTable ({
Url: '/SelectUserAll',//request the url of the background (*)
Method: "post",//request (*)
Toolbar: '# toolbar',//tool buttons which container
Striped: true,//whether the lines between color
Cache: false,//whether or not to use the cache, the default is true, so usually need to set this property (*)
Pagination: if true,//display paging (*)
Sortable: false,//whether to enable sorting
SortOrder: "asc",//sorting way
//queryParams: oTableInit queryParams,//pass parameters (*)
SidePagination: "the client",//paging: client client pages, server server pages (*)
Initialization pageNumber: 1,//load the first page, the default page 1
PageSize: 10,//the number of rows per page (*)
PageList: [5, 15, 25, 50],//the number of rows per page available (*)
//search: true,//whether the display table search, the search is the client, not into the server, so the individual feels meaningless
ContentType: "application/x - WWW - form - urlencoded",
StrictSearch: true,
Whether showColumns: true,//show all the columns
ShowRefresh: true,//whether the display refresh button
MinimumCountColumns: 2,//at least allows the number of columns of
ClickToSelect: true,//if enabled click on line
Height: 700,//line height, if there is no set the height attribute, forms automatically according to the article records the number of thought forms highly
UniqueId: "id",//each line of a unique identifier, usually the primary key column
Whether showToggle: true,//display detail view and list view switch button
Whether cardView: false,//display detail view
Whether the detailView: false,//display parent-child table
The columns: [{
The checkbox: true,//in all the columns displayed before a checkbox
ShowToolbar: true,
}, {
Field: 'id',
Title: 'id',
Align: 'center',
}, {
Field: 'username',
Title: 'user name',
Align: 'center',
}, {
Field: 'sex',
Title: 'gender',
Align: 'center',
The formatter: function (value, rec, index)
{return value=1 https://bbs.csdn.net/topics/=?" Male: "value=0 https://bbs.csdn.net/topics/=?" "Woman:" "; }
}, {
Field: 'email',
Title: 'email',
Align: 'center'
}, {
Field: "address",
Title: "address",
Align: 'center'
}, {
Field: "occupation",
Title: "professional",
Align: 'center'
}, {
Field: "telephone",
Title: "phone",
Align: 'center'
}, {
Field: "Button",
Title: "operation",
Align: 'center',
Events: operateEvents,//register event for the button
The formatter: AddUserFunctionAlty//form add button
}]
});

Trouble, help to see see

CodePudding user response:

Is there a big look at ah
  •  Tags:  
  • Ajax
  • Related