Page 1 of 2
Database Driven Grid not Positioning Correctly
Posted: Tue Nov 28, 2017 10:40 am
by pjshuey
I have a database driven grid with selection criteria. The parameter is pulled from a screen field. The data in the grid does not position correctly. What am I missing?
[attachment=0]DD Grid.docx[/attachment]
Re: Database Driven Grid not Positioning Correctly
Posted: Tue Nov 28, 2017 10:48 am
by pjshuey
Re: Database Driven Grid not Positioning Correctly
Posted: Wed Nov 29, 2017 10:56 am
by lyarbrough
Hi, Patti!
Thank you for attaching your display file and word document. Could you clarify what you're having troubles with? What exactly are you referring to when you mention that the data in your grid does not 'position correctly'? The more information we have about this, the better we can support you and help with a solution.
Thanks!
Re: Database Driven Grid not Positioning Correctly
Posted: Wed Nov 29, 2017 11:16 am
by pjshuey
The grid does not position to the field that is entered in the "Position" field on the screen....it positions past that value in the database file. It looks like the sql is not being built correctly????
Re: Database Driven Grid not Positioning Correctly
Posted: Wed Nov 29, 2017 6:10 pm
by lyarbrough
Patti,
Could you explain what is supposed to happen you type something into the 'Position' text box? Is the grid supposed to only show the data that was typed into the textbox? Is a certain row supposed to gain focus? It's unclear what you're trying to accomplish with this.
If you believe that this is an issue with SQL, you can take a look at the PUISSNVP file. There is a file in the Profound UI library (PROFOUNDUI by default) called PUISSNVP. This file will show what SQL statements are being run from any applications, which might help in figuring out the source of the issue. To do this, run the application and navigate to the given screen. While the application is still open and running, navigate to the PUISSNVP file.
Re: Database Driven Grid not Positioning Correctly
Posted: Thu Nov 30, 2017 1:55 pm
by pjshuey
You should be able to type something into the position text box and then click the magnifying glass. The magnifying glass has an onclick event associated with it that resets the parameter values for the selection criteria on the database driven grid. The grid should then be redisplayed showing the new data based on what was entered in the position text box. It does not work consistently. Many times it is showing incorrect data in the grid.
If you look at the word document I attached originally, I have screen shots of what I just described.
Re: Database Driven Grid not Positioning Correctly
Posted: Thu Nov 30, 2017 5:24 pm
by lyarbrough
We tested this by using something similar on our end, and it seemed to work as expected. Were you able to look at PUISSNVP to view the SQL statements that are being run? You could also look at the PUI0009102 program in the network tab of your browser's developer tools to see the response.
Re: Database Driven Grid not Positioning Correctly
Posted: Fri Dec 01, 2017 10:14 am
by pjshuey
I did look at PUISSNVP to see the SQL statement and it looked fine.
I am now looking at PUI0009102 in developer tools as you suggested, and I am seeing something odd. It looks like it is loading the grid multiple times. The first time looks correct, but the times after that are not using the position to field. Any idea what might be triggering it to load multiple times?
Re: Database Driven Grid not Positioning Correctly
Posted: Fri Dec 01, 2017 11:40 am
by lyarbrough
In the 'onload' event property of your screen, your grid is being refreshed
and rendered.
- img1.png (16.78 KiB) Viewed 2662 times
Your grid will be loaded when you use the refresh() method, and will also be loaded when you use the render() method. We tested this again on our end using the display file that you provided, and everything worked as expected when we removed the render() method from the grid. Could you try removing this to see if this solves the problem that you're having with your grid?
--Lillie
Re: Database Driven Grid not Positioning Correctly
Posted: Fri Dec 01, 2017 11:59 am
by pjshuey
That worked. Thanks so much for your help!