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
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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
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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks for this leirags.
I think that could be the solution.
I will do some testing and report back.
Thanks
DL
I think that could be the solution.
I will do some testing and report back.
Thanks
DL
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.
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.
ASKER