I am using smart-table plugin for pagination.
My requirement is- i am fetching 100 records from database while loading and records per page is 10.
So, number of pages would be 10 in pagination.
Now, i want when i click on the page number 10 (from pagination) then i want to fetch the another 100 records from database & then those new 100 records will append in the table ( total records in table would be 200 and page number would be 1 to 20 in the pagination) and same for when i click on page number 20, another 100 records fetch from database and so on.
What I understood from your question is that you want the table rows to stack on one another instead of being replaced when you navigate on the paginator.
First of all, you don't need to use the default pagination, you can put your own custom markup in the <tfoot> tags
Second, if you want to show different amounts of rows on click, you could use the limitTo filter on the ng-repeat
Here's a plunk showing how I've added buttons that change the amount of rows being displayed on the table. you can use this logic (and functions) on your own template, just fetch the page number you going for, multiply by 10, and set that number as the amount you want to see
Related
Please click here to see the data table I am using a smart table to display the data in angular js , when I do pagination last page of the list is showing the duplicate values , i have 11 records and i am showing 5 records per page , in page 3 11th record is getting displayed twice and if we click the 3rd page duplicate entry is getting added again . how to solve this?
Let's say I set a limit of 10 per page on a set of records retrieved with $results = $this->paginate('ModelName'). The total number of records matching the paginate/find parameter is 30, so 10 records show up on each of the pages. When I look at $results, it contains only 10 records displayed on the page.
Is there a way to get all 30 records in the view without having to separately do something like $allResults = find('all', $params) followed by $this->set('everything', $allResults)?
I ended up passing some of the pagination parameters that can be used to retrieved all of the 30 records from the view via a form to an action.
So, the user clicks on a form on the view that submits hidden variables to an action, where the whole set of 30 records are retrieved and desired operation is performed. Then, the page is redirected to the previously paginated view.
I'm sure there is something out there about this topic but I just can't figure out how to word a search for it.
I have a table of records that gets loaded into a paging grid in the UI. The user has the ability to update/modify these records..also multiple users can use the system at once all hitting the same data. I have a filter on the paging grid allowing the user to see only X type of records.
When the user first enters with filter X selected they see items 1-25 on page 1 of 2. They page to the second page where the items should be 26-50..but before they paged lets say 25 records on the first page had their type changed by another user, now they don't appear when selecting that filter. So now we have 25 less items to page through which means items that were 26-50 before are now items 1-25 and what was page 2 is now page 1 and there is no page 2...
You can probably see the issue I'm getting into, I'm passing an offset to the query to get the next page of results..but now that offset is so high it returns a blank page of records confusing the user and our record processing.
There isn't really an easy solution to this problem. Even GMail/Google doesn't show the exact number of messages/pages found when searching something.
The first thing you can do (if you use a DataGrid/CellTable) is set the boolean exact as false when you call updateRowCount, and give it your current number of records instead of your total number of records. This will make the pager display "1 - 25 of over 25" instead of "1 - 25 of 50".
The next possibility is to update the row count regularly (using RPC polling to check for new/deleted records - or using server push techniques, see GWTEventService and ServerPushFAQ).
You can also check if your request returns items or not, and cancel the call/update the row count if it doesn't.
i am using extJs paging tool bar with store or grid panel ,it works fine with records .
when if there are no records in database,and after receive jsson data.it does,nt display proper number of records which will be zero .please give me solution
You must have the total number of rows calculated in the controller part, to have a result as this one:
{success:true,"total":1,"result":[{"id":"2","MyColumn1":"blabla","MyColumn2":"blibli"}]}
Where total is number of rows
Can you give us your code and the json result that it's given to your store
I am trying to insert a conditional page break, actually i had a report of 50 pages with invoices each invoice is 3 pages long so i need a paghebreak for the 2nd invoice t printon the next page as i need the whole report ot print back to back,so i inserted one page break,so this starts the next invoice to start on 4th page but i want next invoice to start on 5th page which is a new page and i inserted another pagebreak there if the 3rd page of previous report is not filled, but if the 3rd page is filled and the invoice goes on to 4th page then i dont need this additional page break
I tried doign this by taking two rectangles
--first with inert page break at the end
--second with conditional visibility of the rectangle2 and with page break at the start.
and the condition for the rectangle2 to be visible is like
Visibility---hidden and expression is
--iif(count(id field of the table in third page)>=24,true,false)
i.e 3rd page accomodates atmost of 24 records and if the records are more than 24 i dont need another pagebreak and i am hiding the rectangle2 only if records are less than 24 i need another page break and i am not hiding the rectanlge2
BUT THE VISIBILITY IS NOT WORKING AND THE RECTANGLE2 IS NOT WORKING.
Please help me with this..
You should be able to add a column to the data source, such as InvoiceNumber, that you could define as a page-breaking group. Then the page should break before a new Invoice and at the end of each of your rectangles.
This is a known problem with SSRS 2005. It's very unfortunate actually. Have a look at my question here.