Bootstrap table paging In asp.net MVC, bootstrapmvc
Chinese translation documentation:
Http://blog.csdn.net/rickiyeat/article/details/56483577
Version description:
Jquery v2.1.1
Bootstrap v3.7
Bootstrap-table V1.11.1
I. view page1 Ii. process scripts1 var TableInit = function () {2 var oTableInit = new Object (); 3 4 // initialize
the number of displays per page$page = 1; The first default is page 1thif (!empty ($_get[' page ')) {$page = $_get[' page '];}$start = ($page-1) * $pageSize; Start line number $sql = "SELECT * from Show_register ORDER BY id desc limit $start, $pageSize ; "; $result =mysql_query ($sql); if ($result ===false) { echo "Failed to get data"; }else{ $fileName = $_ server[' Script_name ']; 5.1 6.2 Gets the current relative path/folder/file name. PHP form $numCount =mysql_num_fields ($re
1 Public functionGet_search ($page=1){2 $slide=$_post[' Slide '];3 $page=Trim($page);4 $arr=$this->m->get_all ("Select a.* from ' Lx_z_news ' as a where a. ' title ' like '% ').$slide." % ' UNION ALL SELECT b.* from ' lx_z_product ' as B where B. ' title ' Like '% '.$slide." %‘ ");5 $row=Count($arr);6 $page 2=page ($page,$row, 10);7 $select _from=$page 2[' Select_from '];8 $select _limit=$page 2[' Select_limit '];9 $arr 1=$this->m->get_all ("Select ' A ' tbname,a.title,a
SQLPager Stored ProcedureCopy codeThe Code is as follows:ALTER proc [dbo]. [SqlPager](@ TblName varchar (255), -- table name (Note: Multiple table links are allowed)@ StrGetFields varchar (1000) = '*', -- the column to be returned@ OrderfldName varchar (255) = '', -- Name of the sorted Field@ PageSize int = 10, -- page size@ PageIndex int = 1, -- page number@ DoCount int = 1 output, -- number of records que
WordPress article list also realizes the page is very simple, there are a lot of code directly copied over the Internet can be implemented, but if the list page output is our new data table content, this can not be achieved! You need to develop it yourself.Php+mysql combined with some methods of WordPress implementation!The code is as follows:$page=$_get[' Page '];//How many pages are you currently on?$pagesize= 10;//show number of records per page$pa
First, the JavaScript codeThen the HTMLThe last is the controller's method (this part is the most important, the table can display the data, all look at this part)Finally, the controller-related methodTurn--mvc+ef easyui dataGrid dynamic load Paging table
-linkbutton"Plain= "true"ID= "button495769"Iconcls= "NULL"onclick= "onClickbutton495769 ();" >End escalationa>Get the ID of the selected row and stitch it up:function onClickbutton495769 () {var rows = $ (' #tabgrid20170726191838251403 '). DataGrid (' getselections '); if (Rows! = NULL) {var ids = ""; for (var i=0;iClick on the specific task to achieve the jump:function onClickRow20170726191838251403 (rowindex, RowData) {var row = $ (' #tabgrid20170726191838251403 '). DataGrid (' GetSelected ');
Bootstrap table server-side paging example, bootstraptable
1. You can download the js required for front-end introduction from the official website.
Function getTab (){Var url = contextPath + '/fundRetreatVoucher/fundBatchRetreatVoucherQuery.htm ';$ ('# Tab'). bootstrapTable ({Method: 'get', // set this parameter to get. I don't know why post cannot be obtained.Url: url,Cache: false,Height: 400,Striped: t
ServletexceptIon, IOException {/* * 1. Encapsulates the form data into the customer object, it has only four attributes (CNAME, gender, cellphone, email) * It is a condition * 2. Use the customer to invoke the service method, Get listDAO layer (persistence layer)/** * Persistence Layer * * @author CXF * */public class Customerdao {private Queryrunner QR = new Txqueryrunner ();/** * Add Customer * * @pa Ram C */public void Add (Customer c) {try {String sql = "INSERT into T_customer values (?,?,?
This paper describes the implementation of the PHP background table paging function. Share to everyone for your reference, as follows:
user.php:
delete.php:
Note:
(1) Using AJAX can realize the value optimization, improve performance, there is no implementation;
(2) Next page There are not some bugs, not to the last page to stop, follow-up to achieve it.
The SQL table structure is as follows:
SQL paging statement:
Select top 5 *, (select count (*) inum from (select distinct areaid, areatypeid, lifeyear, [State], relatedid from monitorbaseenterinfo where 1 = 1) I) as countnum from (select row_number () over (order by lifeyear DESC) as rownumber, * from (select distinct areaid, areatypeid, lifeyear, [State], relatedid from monitorbaseenterinfo wh
if exists (select 1 from sysobjects where name = ' proc_pagination ') drop proc proc_pagination go create proc Proc_paginatio N--Creates a paging stored procedure @page int = 1,--the number of pages @pagesize int = 10, the size of each page @tableName varchar (100), the table name to query @orderFields varchar (255 --The sorted field name (to be sure) @GetFields varchar (1000) = ' * ',--the column to be ret
This article mainly introduces the pages written in pure js. The table data is a json string. If you need it, you can refer to the following content and directly go to the Code:
The Code is as follows:
String path = request. getContextPath ();String basePath = request. getScheme () + ": //" + request. getServerName () + ":" + request. getServerPort () + path + "/";%> ">
Paging
following inferences:
1 The efficiency of the WebService interface is slow
2 The client adopts the way of post, can reduce the amount of data, can partially offset the efficiency of WebService interface is slow?
Above two inferences, although we did not complete the comparison, but can be sure that they are hedging efficiency, webservice slow, reflected in the page is no wonder that the page is waiting for a long time does not come out, resulting in a decline in user experience, but because
Label:Source: A braised egg background: One of their own site, because the single-table data record up to 1 million, resulting in slow data access, the background of Google Analytics often report timeouts, especially pages with large page is slow. test Environment: First let's familiarize ourselves with the basic SQL statements to see the basic information we will be testing the table
Use Infomati
data is as follows:
where the URL is the server's request address; Param is the parameter object that needs to be sent to the server;
The code for using the server data JavaScript is as follows:
Note: The server, in addition to the array content to the Component table, also requires a key name for the total number of pages, named Page_num
(2) Component source code
As for paging the realiz
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.