2
votes

I have an interactive grid, which contains more than 200000 rows of data. Instead of having page numbers listed below, is there any way I can have a drop down select list, which contains options such as 1-40 records, 40-80 records, and so on. So that the user can go directly to the end of the report.

Is there any way to implement this?

1

1 Answers

0
votes

so what you essentially need is a sequence in a SELECT that is big enough. I think this should work for you

select LEVEL 
  FROM DUAL 
CONNECT BY LEVEL <= CEIL(:rowcount / 40);

What this does is create a sequence up to the CEIL(:rowcount/40) number, so if that number is 3, the result is 1, 2, 3.

Then you can play around with this to display as 0-40, 40-80, 80-120,... Hope this does what you need.

EDIT TO ANSWER COMMENT(Changing total row count at the bottom):

I dont think this is made possible in APEX, but it can be acomplished with js.

I would suggest you make a DA that runs on start and every time the Select list you are now using is changed. The DA will generate the current text you want down there, say for selection 40-80 you say "1 of 567" or whatever, then you will have to set this text with js.

If you are not already you will have to get used to the js console.

You will have to set a static ID to the grid, then run js that looks something like this:

var temp = $("span#dn_main_ig_grid_vc_pageRange")[0]
temp.children[1].innerText = "text"

Where dn_main is the static ID of my grid, so substitute that with yours. You should open up the console and go step by step and see what you are selecting with each step. Then once you understand what this is doing, you can use it in your DA to change the "text" to whatever you need there.

And for getting the value of a page item in js, in case you are not familiar, https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6341/index-en.html

I hope this helps