Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Powerbuilder "RowsMove" not working for simultaneous selected rows

Powerbuilder "RowsMove" not working for simultaneous selected rows

Powerbuilder "RowsMove" not working for simultaneous selected rows

Please help me. I am a beginner.
I have a problem that I have written a code in which a button check for the row either it is selected or not. And if it is selected then it Moves the row from one Datawindow to another. But the problem is;
When I move single row it works fine.
While it also move multi rows which are having a row space in between rows. i.e. 1,3,6 or 2,6,8

????? And when I select multiple rows simultaneously then it moves only single row. i.e. Row# 1,2 or 2,3,4 ?????

My code is:

boolean result
for sRow = 1 to dw_lhr.rowCount()
result = dw_lhr.IsSelected(sRow)
IF result THEN
dw_lhr.RowsMove(sRow, sRow, Primary!, dw_grn, 1, Primary!)

RE: Powerbuilder "RowsMove" not working for simultaneous selected rows

Since you are moving a row from the dw_lhr datawindow, the rowcount changes once the first row has been moved.

You might be better off using a loop with the GetSelectedRow method.

Something like

result = dw_lhr.GetSelectedRow(0)
DO WHILE result > 0
   dw_lhr.rowsmove(result, result, Primary!, dw_grn, 1, Primary!)
   result = dw_lhr.GetSelectedRow(0)


"Nature forges everything on the anvil of time"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close