3
votes

Net 12.5 and creating a small data entry program. The datawindow compose of 1 dropdown datawindow and the remaining 4 columns is set to edit

the problem here is, the dropdown datawindow is uneditable. i have set override edit to true and set datawindow.readonly='No'/dw_1.object.datawindow.@readonly=false.

but all else fail. i cant still edit the contents of my datawindow.

note

when Add button was pressed datawindow will set its readonly = false datawindow columns has protects if its newrow() the column that can be editable is a dropdown datawindow

please help

love lots

7
Did you checked the protect and taborder properties for that column?Seki
the protect was made when the add button was pressed. i wrote it like this dw_prod.Modify("pt_pname.Protect='1~tIf(IsRowNew(),0,1)'") and the tab order of that column is 10user3089162

7 Answers

2
votes

Please check the "Tab Order" for that column.

1
votes
  1. Check the tab order of each column in your datawindow object (the one with all the columns), if it is zero, it won't be able to get focus.
  2. Did you specify a drop down datawindow for your column that has the dddw edit style applied? Also did you set the data value, and display value? Is it a datawindow that doesn't require retrieval arguments? If it requires retrieve args, you need to add code to retrieve the dddw data manually.
  3. Are you able to drop the list down? Did you check the Always show arrow check-box on it? Just curious if you do, can you drop the list then? You don't need to check Allow Editing unless you want user to change values in the list or do searching in it (advanced)
  4. Did you do settransobject on the datawindow control, are you seeing data at all? If it is brand new data did you do an InsertRow ?
  5. Is your datawindow object set to "allow updates" under Rows... Update Properties...
  6. Does your table have a primary key?
  7. Is AutoRetrieve checked in your datawindow object for that column?

These are just a few things I think of that could case problems but I am very unclear about what is going on.

More information would be helpful...

This statement makes no sense at all please clarify/rewrite it if you want help.

i have set override edit to true and set datawindow.readonly='No'/dw_1.object.datawindow.@readonly=false.

1
votes

isRowNew() doesn't seem to work fine. I have made some test and i can't make it work, after google this, i can see that others have the same issue since 2004, and nobody cares. Maybe now that SAP buy this product, they will correct it, or not.

The only solution i found is using Isnull(). You have tu assume, that when you add a row its values are null, and old rows have values (using pk ok, but using others they can be null), so you must protect those which are not null

This isn't a perfect solution but is the only one that works.

0
votes

On the Edit tab of the DDDW properties, select the Allow Editing checkbox. Override Edit is used when a column is set to prompt for criteria.

0
votes

In the column go to protect properties and enter:

If(isrownew(), 1, 0)

That's it.

0
votes

You need to check following:

1. Open dddw object and set tab order.
2. set tab order of that column where dddw set.
3. Set protect = 0 of that column in both objects.(datawindow & dddw object)

please comment your status.

0
votes

IsRowNew() has no problem in PB-12.5

Either you are changing status of the row in your script or you are overwriting your expression in your script somewhere. Your column expression is correct

dw_prod.Modify("pt_pname.Protect='1~tIf(IsRowNew(),0,1)'")