Configure length/size/amount of results for a query result user prompt
Is there a way to control how many query results are returned, using pages (arrows) to reach additional / overflow results?
The case for me is selecting users. Even when typing part of a user's name, there are still many results. Limiting users displayed to 5 per page would save me space / real estate on the form.
Best Answers
-
seth_coussens Member Ninja IT Monkey ✭✭✭✭I'm thinking you'd put something like this in your custom.js file:
$(document).ready(function (){ //set request offering grids to 5 items per page if(href.indexOf("ServiceCatalog/RequestOffering") > -1){ console.log("I'm setting the grids to 5 items per page."); $('[data-role=grid]').each(function (index){ $(this).data('kendoGrid').dataSource.pageSize(5); }); } });
That should set the grids on a request offering page to show a max of 5 items per page2 -
seth_coussens Member Ninja IT Monkey ✭✭✭✭Yes, you could change the value in the href.indexOf statement to contain the GUID of the individual request offering page.5
-
Aaron_Boock Customer Advanced IT Monkey ✭✭✭
I added "window.location." and now it works perfect.
changed: href.indexOf("ServiceCatalog/RequestOffering")
to: window.location.href.indexOf("ServiceCatalog/RequestOffering")
6
Answers
Basically, you'd add 1 - 2 text fields before the query prompt (think first name, last name), then you can use the information entered into those fields (called tokens) within your query prompt criteria. This would filter the results by both fields prior to even getting down to the query prompt itself.
That should set the grids on a request offering page to show a max of 5 items per page
Hi Seth, when testing the javascript snippet, my portal pages load blank. Does this feedback indicate any potential modifications that I could re-evaluate?
I added "window.location." and now it works perfect.
changed: href.indexOf("ServiceCatalog/RequestOffering")
to: window.location.href.indexOf("ServiceCatalog/RequestOffering")