The use bootstrap Table

 

 Then add css find bootstrap-table.min.css added to it

 

 Add JS

 

 

Js added when added in the order   

Then initializes bootstrap-table

 

 

<Script type = "text / JavaScript">
$ (
function () {
// AJAX request to the background
// 1 initializes the Table.
var pilotable new new TableInit = ();
oTable.Init ();
}

);

Then bootstrap-table

TableInit function = var () {
var = oTableInit new new Object ();
// initialize the Table
oTableInit.Init = function () {
$ ( '# the Table1') bootstrapTable ({.
URL: 'User.ashx GetUserList Action =?', // URL request background (*)
Method,: 'POST', // request method (*)
Toolbar: '#toolbar', // tool buttons which container
striped: true, // whether to display the color line spacing
cache: false // whether to use the cache, the default is true, so under normal circumstances need to set this property (*)
pagination: true, // whether to show pagination (*)
sortable: false, // whether sorting is enabled
sortOrder: "asc", // Sort
queryParams: oTableInit.queryParams, // passing parameters (*)
sidePagination: "Server", // pagination: client-client pages, server-side paging service (*)
pageNumber: 1, // initialize the first load page, the first page of the default
pageSize: 2, // record the number of lines per page (*)
pageList: [10, 25, 50, 100],// number of lines per page to choose from (*)
search: false, // whether to display table search, this search is the search for the client, the server does not enter, so personal feeling of little significance
contentType: "the Application / the X--the WWW-form-urlencoded",
strictSearch: to true,
showColumns : false, // whether to display all the columns
showRefresh: false, // whether to display the refresh button
minimumCountColumns: 2, // minimum allowable columns
clickToSelect: true, // whether to enable click to select the row
height: 700, // height row If not set the height attribute tables according to the number of records that automatic table height
uniqueId: "no", // uniquely identify each row, generally a primary key column
showToggle: false, // if the display switching button list view and detailed view
cardView: false, // whether to display a detailed view
detailView: false, // whether parent-child table
Columns: [
{
Field: 'FAccount',
title: 'account number'
}, {
Field: 'the FName',
title: 'name'
} ,
{
Field: 'FID',
title:'operating',
formatter: operateFormatter // custom method, action buttons
},
],
RowStyle: function (Row, index) {
var classesArr = [ 'Success', 'info'];
var strclass = "";
IF (index = 2% == 0) {// even rows
strclass classesArr = [0];
} // the else {odd rows
strclass classesArr = [. 1];
}
return {classes: strclass};
}, // interlaced color
});

};


// get the query parameters
oTableInit.queryParams = function (params) {
var = {// the TEMP variable name and the name of the controller where the key must have been, here changes, the controller also need to change the same
limit: params .limit, // page size
offset: params.offset
};
return TEMP;
};
return oTableInit;
};


function operateFormatter (value, row, index ) {// Parameters given
return [
'<a href="#"> class="btn Active disabled" add users </a>',
'<= class A "BTN Active" href = "#"> remove user </a> ',
] .join (' ');
}

CS does not use background pages

Then create a general file processing

ashx. cs page editing background

You want to edit a table on the line

 

Guess you like

Origin www.cnblogs.com/yutang-wangweisong/p/11522059.html