pagination

Paged table with ASP.NET MVC and AJAX

I'm looking for good patterns for implementing a paged table of results in ASP.NET MVC with sorting, filtering, and paging provided via AJAX. It seems to me that I should have my controller actions provide only the data and not mark up to maintain the separation of concerns -- so the Ajax callback would provide new table data and pager ...

How to perform page control?

I mean what the most efficient way to get information about the quantity of your page's items and make sql query with LIMIT that you need. or I should get all items and then crop array with php functions? now I do 2 queries: first to count all items and second to get items that I need with LIMIT. OK, I'll be more concrete. For exam...

Pagination Problem [PHP]

So I'm doing this in PHP but it is a logic issue so I'll try to write it as generically as possible. To start here's how this pagination script works: for (draw first three pages links) if (draw ellipsis (...) if there are pages between #1's pages and #3's pages) for (draw current page and two pages on each side of it links) if (draw ...

Offset vs page number when doing pagination

This is pretty trivial, but I noticed on SO that instead of an offset they are using page numbers. I know the difference is minor (multiply the page number by rows on a page or divide offset by rows on a page), but I'm wondering if one is recommended over the other. Some sites, like Google, of course use a more complicated system becaus...

Pagination in CouchDB?

How would I go about implementation the queries required for pagination? Basically, when page 1 is requested, get the first 5 entries. For page 2, get the next 5 and so on. I plan to use this via the couchdb-python module, but that shouldn't make any difference to the implementation. ...

How to paginate an ObservableCollection?

Hello all, I have a ListBox with way too many items in it and the UI is getting slower and slower (virtualization is on, etc). So I was thinking about displaying only the first 20 items and allow to user to navigate through the result set (i.e. ObservableCollection). Does anybody know if a Pagination mechanism exist for the ObservableC...

Paginating very large datasets

I have a dataset in MySQL where using limit is already an expensive query, and finding the number of results is expensive as well. Thus, I'd like to avoid doing another query to find the number of results. I cannot use MYSQL_CALC_FOUND_ROWS because the limit is inside a subquery: SELECT * FROM items, ( SELECT item_id FROM ...

How to reuse a Criteria object with hibernate?

I'm trying to do query result pagination with hibernate and displaytag, and Hibernate DetachedCriteria objects are doing their best to stand in the way. Let me explain... The easiest way to do pagination with displaytag seems to be implementing the PaginatedList interface that has, among others, the following methods: /* Gets the total...

Zend Pagination - Seems Not to be limiting number of results on each page

Hello, I am relatively new to The Zend framework having only been working with it probably two months at the most. I am now trying to get a list of results from a query I run, send it through the zend paginator class and display 4 results per page, however it does not seem to be recognising when it has got 4 results, I believe there is...

Pagination: Server Side or Client Side?

What is it best to handle pagination? Server side or doing it dynamically using javascript? I'm working on a project which is heavy on the ajax and pulling in data dynamically, so I've been working on a javascript pagination system that uses the dom - but I'm starting to think it would be better to handle it all server side. What are e...

Split Data into Pages

How do I split data into pages on ASP.Net? I'm looking for something like what Google does when you have too many search results and it splits them into x number of pages. ...

Using DataPager without retrieving all rows on each request

I have a ListView that I am databinding to a collection of objects something like this: int total; List<Client> clientList = clientData.GetClients(criteria, pageNum, pageSize, out total); uxClientList.DataSource = clientList; uxClientList.DataBind(); Where the pageNum, pageSize and total parameters facilitate paging at the data a...

In MVC, should pagination info go in the path or querystring?

In the path: Format: http://mydomain.com/{category}/{subcategory}/{pageNumber}/{pageSize} Example: http://mydomain.com/books/thriller/3/25 In the querystring: Format: http://mydomain.com/{category}/{subcategory}? pageNumber={pageNumber}&pageSize={pageSize} Example: http://mydomain.com/books/thriller?pageNumber=3&amp;pageSize=25 I l...

What is a good way to paginate out of SQL 2000 using Start and Length parameters?

I have been given the task of refactoring an existing stored procedure so that the results are paginated. The SQL server is SQL 2000 so I can't use the ROW_NUMBER method of pagination. The Stored proc is already fairly complex, building chunks of a large sql statement together before doing an sp_executesql and has various sorting optio...

How to do effective paging in Classic ASP?

I'm trying to page a table, and while I have paging already working, it displays every page in a single line along with Previous/Next links, causing the HTML page to break if there are a lot of results (which often there are). What I'd like to do is display the pages in batches of 10, e.g. 1...10, if you're on page 10 and click "Next" t...

in rails using will_paginate and partials

I have a collection of people that is paginated with will_paginate @people = Person.paginate :page => params[:page], :limit => 10, :conditions => ['company_id = ? ' , @company.id ] The people are shown on the company/view page and rendered with a partial. Note that the partial is in the views of 'people' <%= ...

HQL - row identifier for pagination

Does anyone know if HQL has a keyword to identify rows such as ROWID or ROWNUM? I would like to implement pagination with HQL but I am not able to use .setMaxResult() or .setFirstResult() because I don't work with the session object directly and therefore don't use the Query object but simply create my query as a string and use the .fin...

What are some methods for handling pagination of long lists?

I'm wondering if there are any standard methods of keeping the correct pagination of real-time lists. For instance, on Stack Overflow if I go to page 2, and in the period of looking at page 1 a new question was submitted, how can I keep page 2 the same as it was when I started looking at page 1? A lot of the time people will just do an ...

outputting records -- blank

I am trying to output records from a mysql db with simple pagination, however no information is output at all, and no errors are displayed. The error seems to be with the $data query and using mysql_num_rows, as it worked(aside from paginating) before this. Is there some basic error in my logic? <?php $query =''; if (isset($_GET["query...

Is there a piece of public code available to create a page index using PHP?

I have a MySQL table holding lots of records that i want to give the user access to. I don't want to dump the entire table to the page so i need to break it up into 25 records at a time, so i need a page index. You have probably seen these on other pages, they kind of look like this at the base of the page: < 1 2 3 4 5 6 7 8 9 > For ex...