1. Gayathri Ravi
  2. PowerBuilder
  3. Friday, 2 August 2024 16:16 PM UTC

Column order keeps changing in Datawindow every time we open the window. We cleared the registry entry of this window and logged in to the application and opened the screen, it displays the column in correct order. And soon close the screen and reopen, all columns and data jump around. This issue started to happen after we migrated our powerbuilder application from 12.6 to 2019 R3 version. Could you please shed some light on this issue?

Attached the default layout and how the layout keeps changing each time. 

 Here are our additional findings,

 

  1. Column position is not changing if we add the breakpoint in code and run the application in Debug mode. We are not stepping in to the breakpoint, just clicking continue when it enters the breakpoint.
  2. We tested the same screen by running in debug mode, but this time we disabled all breakpoints. Column position got changed.
  3. We tested the same screen by directly running the application from PowerBuilder, column position got changed again.

 

In conclusion, if the run the application in debug code by adding the breakpoint, then the column positions remain the same as expected. Could you please let me know why the application behaves differently when we test it using run and debug mode with the same codebase in PowerBuilder?

 

Regards,

Gayathri

Attachments (2)
Ronnie Po Accepted Answer Pending Moderation
  1. Friday, 2 August 2024 18:34 PM UTC
  2. PowerBuilder
  3. # 1

Is this a grid DW? Check to see if your code is automatically positioning or resizing anything. Grid columns can sometimes behave unpredictably when resized/moved dynamically.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 2 August 2024 18:07 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Gayathri -

Is your PB app built upon an object framework, such as the PowerBuilder Foundation Class (PFC)? It contains some DataWindow services that can save/restore column ordering and/or placement.

Is this DW created dynamically in the app, based on a SELECT statement or a stored procedure?

Does this problem occur with any other window/DataWindow in the application?

What is the registry key that you clear to "reset" conditions?

Also, the attached info you mention in your original post is missing.

Best regards, John

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 2 August 2024 18:06 PM UTC
  2. PowerBuilder
  3. # 3

Hi Gayathri, 

You mention "2 attachments" but I see none.

regards

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 August 2024 16:36 PM UTC
  2. PowerBuilder
  3. # 4

Hi Gayathri;

  Neither the PB IDE or the PB Runtime ever changes any DWO at runtime. This sounds like a piece of your Application's PowerScript code that could be using: Dynamic DW; external DWO source; Modify() commands; changing the "DataObject" property, etc at execution time that in turn changes the DWO's appearance (aka column order) at runtime. Since you mention clearing the registry helps for a bit, I would also look at PowerScript code that is reading the registry and see if / where that might be the source of your App's weird DWO behavior.  HTH

Regards .. Chris

Comment
  1. Miguel Leeuwe
  2. Friday, 2 August 2024 18:10 PM UTC
Yes I agree, John also thinks the same.

By removing the registry entries, whatever code is trying to find the column positions fails en therefore (most likely) just uses the default order as in the constructed datawindow.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.