1. mahmoud mahmoud
  2. PowerBuilder
  3. Monday, 2 January 2023 13:55 PM UTC

when i run loop on datawindow it move from row 1 to last page row and scroll to another page

but i need to move from row to next row but not using scroll  like when i deploy project i need datawindow same

 

 

John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 11 January 2023 02:15 AM UTC
  2. PowerBuilder
  3. # 1

Hi, Mahmoud - 

Please try the attached sample app to see if it does what you are looking for.

This technique may not work for a grouped DataWindow (like the one in your video), because sorting of the rows and a GroupCalc() function call may be required after a row is appended.

Best regards, John

Attachments (1)
Comment
There are no comments made yet.
mahmoud mahmoud Accepted Answer Pending Moderation
  1. Saturday, 7 January 2023 14:17 PM UTC
  2. PowerBuilder
  3. # 2

this vedio explan

Attachments (1)
Comment
  1. Miguel Leeuwe
  2. Sunday, 8 January 2023 18:19 PM UTC
I've watched the video, (nice music :) ). You've adopted the suggested code by Olan, but I don't think that's what you want. You want all of the rows scroll up ONE row every time, not only scrolling up a full page when reaching a row that's not visible.

To do what you want, I think you would have to use a blank datawindow control into which you would insert new rows and then scroll to them.
  1. Helpful
  1. Miguel Leeuwe
  2. Sunday, 8 January 2023 18:20 PM UTC
(or something like that).
  1. Helpful
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 4 January 2023 12:46 PM UTC
  2. PowerBuilder
  3. # 3

Hi.

Can you provide the code so we can see what you do? Simply show us the loop and how you manipulate your datawindow.

Andreas.

Comment
There are no comments made yet.
mahmoud mahmoud Accepted Answer Pending Moderation
  1. Wednesday, 4 January 2023 11:11 AM UTC
  2. PowerBuilder
  3. # 4

nothing change

 
Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 2 January 2023 18:52 PM UTC
  2. PowerBuilder
  3. # 5

FOR ll_row = ll_first_row TO ll_last_row

    ll_rc = dw.SetRedraw (TRUE)
    ll_rc = ScrollToRow (ll_row)
    ll_rc = dw.SetRedraw (FALSE)

 
   ... do processing

NEXT

Comment
  1. Miguel Leeuwe
  2. Tuesday, 10 January 2023 02:54 AM UTC
(on Windows now) Verfied, that property cannot be modfied using a Modify().
  1. Helpful
  1. Olan Knight
  2. Tuesday, 10 January 2023 16:16 PM UTC
Ah, well. It was worth a shot.



The only other way to handle this of which I am aware is to know the width of each row, and to manually scroll the DWO at runtime. I've done that it myself previously, and getting the height of t he column, including the borders is the key to this working correctly. I did this with a computed FIELD that I referenced at runtime via script, then used that value to scroll the DWO.

  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 10 January 2023 16:51 PM UTC
Wow, that sounds like overkill but nice!

I don't really understand what the purpose of this functionality is in the first place. I would just unselect and select rows (or use a rowfocusindicator), in combination with scrollToRow. That way the user sees what's happening anyway.
  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.