Link to home
Create AccountLog in
Avatar of cintra
cintra

asked on

Powerbuilder DataWindow - Preventing New Row when Tabbing Off Last Column

Hi All,

I would be grateful for suggestions on the following scenario.

We have a dynamically created datawindow, which is used as a data entry form.
We only ever want one row in this datawindow, but each time the user tabs off
the last last column on the datawindow a new row is created. Without having to
use the DeleteRow function, is there any way of preventing the new row being created
when the user tabs off the last column? I can trap the Tab key press using event id, pbm_dwnkey, but as far as I can see Powerbuilder has already generated the row by the time the script associated with pbm_dwnkey runs. I think I'm really looking for a way to prevent Powerbuilder creating a new row, when one exists already.

Thanks

DL


 
SOLUTION
Avatar of stanner
stanner

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of cintra
cintra

ASKER

Thanks for the response. I'm fairly certain there is only one InsertRow occurring, but I will double check.
 
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of cintra

ASKER

Hi Again,

Thanks for the comments above. I am not using PFC, but I notice that the behaviour of a dataobject created as freeform is different from a dataobject
created as tabular. When the freeform datawindow is placed on a window, tabbing off the last column does not create a new row, but if the tabular datawindow is used on the window, tabbing off does indeed generate a new row. I think my dynamically created datawindow may be getting created as a tabular datawindow, even though it's only ever supposed to hold one row. I will do further checking and revisit the question to assign points to all who responded.

Thanks




 
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of cintra

ASKER

Thanks for this leirags.

I think that could be the solution.
I will do some testing and report back.

Thanks

DL
Avatar of cintra

ASKER

Hi all,

I can't replicate the beheaviour I originally described with a "normal" datawindow, but only with one that is dynamically created at run time. In any case, I have discovered a work around, based on the suggestion from leirags.

I will distribute poinst to all who responded.

DK.