Many a times result set is huge and increases the page length, did anybody try implementing the same?
Hi Pranjal,
I had a check on this. It should be very straight-forward. I wouldn't use any library for this myself. This is my (MySQL) query:
SELECT Name, Population FROM Country WHERE Continent = :Continent LIMIT :StartIndex,:PageSize
Important: this must be entered in the "Parameter Types" field: StartIndex=Integer&PageSize=Integer
In my macro, I checked the fields "Load macro dynamically", "Enable dynamic parameters" and "Use change params template". This is what I get:
image2016-9-20 11:33:10.png
With JS I can easily reload the macro for another start index:
(function() {
var container = $('.pocketquery-dynamic-load[data-query="Pagination"]');
var dataIndex = container.data('index');
var data = PocketQuery.getDynamicLoadData(dataIndex);
data.queryParameters = { Continent: 'Europe', PageSize: 10, StartIndex: 30 };
PocketQuery.load({
container: container,
data: data
});
}())It's now very easy to build some HTML for the pagination menu. Just let me know if you need further help ![]()
Felix (Scandio)
Felix,
Other RDBMS queries can be seen here http://weblogs.asp.net/fbouma/api-s-and-production-code-shouldn-t-be-designed-by-scientists
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solution is interesting but in our case it would be more sufficient if there would be a possibility Pranjal Shukla described the way in http://paginationjs.com/. Are there any further possibilities?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Felix, I did find something here http://paginationjs.com/ but trying to figure out how can i implement it. I'll look into this later today and explore. If you can help me real quick, it'd be great.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pranjal! Haven't heard of anyone who did this yet. Nor have I tried myself. But the possibilities are there. You can write some JS in your template and use the PocketQuery.load method with a pagination parameter. Shouldn't be so difficult.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.