Does anybody know how to position the scrollbar WITH filter (right click column and click filter)? It works fine unfiltered and even works fine sorted on any column but does NOT work if filtered.
I have a hidden field called "rowNo" and onrowclick event "changeElementValue('rowNo', row);"
My RPG program moves "rowNo" to SFLREC and the EXFMT the screen. Subfile record number is specified on the subfile screen with bound field SFLREC.
Like I said, it works fine until filtering the subfile.
scrollbar position WITH filter
-
- Profound User
- Posts: 29
- Joined: Fri Jan 15, 2016 12:18 pm
- First Name: Kenny
- Last Name: K
- Company Name: slyacauga utilities board
- Phone: 256 401 2501
- State / Province: Alabama
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: scrollbar position WITH filter
Hi Kenny,
Sorry to hear that you are having problems getting things to work. I'm not completely sure that I understand what's happening in your scenario?
Each time you use EXFMT it completely wipes out the screen and re-draws it. After it does that, it will position to the row you specified in the "subfile record number" property.
You say this doesn't work with a filter... and this is where I'm getting lost. The filter should've been completely wiped out when you did EXFMT. How are you re-enabling it? Are you using the persist state property to remember the filter and re-apply it each time the screen is re-drawn? Or are you using the filter APIs? Or is this a database-driven grid?
Sorry to hear that you are having problems getting things to work. I'm not completely sure that I understand what's happening in your scenario?
Each time you use EXFMT it completely wipes out the screen and re-draws it. After it does that, it will position to the row you specified in the "subfile record number" property.
You say this doesn't work with a filter... and this is where I'm getting lost. The filter should've been completely wiped out when you did EXFMT. How are you re-enabling it? Are you using the persist state property to remember the filter and re-apply it each time the screen is re-drawn? Or are you using the filter APIs? Or is this a database-driven grid?
-
- Profound User
- Posts: 29
- Joined: Fri Jan 15, 2016 12:18 pm
- First Name: Kenny
- Last Name: K
- Company Name: slyacauga utilities board
- Phone: 256 401 2501
- State / Province: Alabama
- Country: United States
- Contact:
Re: scrollbar position WITH filter
Yes, using persist state property
Not using filter API, just right click and filter column
Not a database-driven grid, load a subfile from RPG
Probably has something to do with the RRN it returns versus the number of records showing on the screen when filtered.
Strange thing is it works fine when sorting on a column which totally re-sequence the RRN (click on 5th record down, may be RRN 289 but still moves to the top and the rest remain in sorted sequence.
Not using filter API, just right click and filter column
Not a database-driven grid, load a subfile from RPG
Probably has something to do with the RRN it returns versus the number of records showing on the screen when filtered.
Strange thing is it works fine when sorting on a column which totally re-sequence the RRN (click on 5th record down, may be RRN 289 but still moves to the top and the rest remain in sorted sequence.
-
- Profound User
- Posts: 29
- Joined: Fri Jan 15, 2016 12:18 pm
- First Name: Kenny
- Last Name: K
- Company Name: slyacauga utilities board
- Phone: 256 401 2501
- State / Province: Alabama
- Country: United States
- Contact:
Re: scrollbar position WITH filter
So, I found a work around.
I put "changeElementValue('Filter1', getObj("Grid1").grid.getFilter(1));" in the "onfilterchange" event.
Then made my RPG program that loads the subfile duplicate the filter so only filtered records are loaded.
Seems to work, BUT, I need to automatically do an enter (pui.click) after the filter is keyed.
Currently, I have to hit enter twice, once to get out of the filter box, and once again for the subfile refresh.
Any ideas?
I put "changeElementValue('Filter1', getObj("Grid1").grid.getFilter(1));" in the "onfilterchange" event.
Then made my RPG program that loads the subfile duplicate the filter so only filtered records are loaded.
Seems to work, BUT, I need to automatically do an enter (pui.click) after the filter is keyed.
Currently, I have to hit enter twice, once to get out of the filter box, and once again for the subfile refresh.
Any ideas?
-
- Profound User
- Posts: 29
- Joined: Fri Jan 15, 2016 12:18 pm
- First Name: Kenny
- Last Name: K
- Company Name: slyacauga utilities board
- Phone: 256 401 2501
- State / Province: Alabama
- Country: United States
- Contact:
Re: scrollbar position WITH filter
I didn't use "filter response" because the documentation says "This should be used only for page-at-a-time grids, not for database-driven grids nor for load-all grids."
I decided to try it anyway on my load-all grid and it seems to be working fine!
Does anybody know what I should be looking out for as to why it should NOT be used on load-all grids?
I decided to try it anyway on my load-all grid and it seems to be working fine!
Does anybody know what I should be looking out for as to why it should NOT be used on load-all grids?
Who is online
Users browsing this forum: No registered users and 0 guests