0
votes

I have a datawindow that depending on a particular value; X=1 a single column is editable. If X=0 the column is protected and disabled. All other columns in the datawindow detail are with tab index 0.

When this is setup it is not possible to selectrow() in code from the click() event when user attempts to select the row with no columns enabled. It always places the user in the following row where the column is enabled.

So when all rows have a column that is enabled, it is possible to select all rows. If there are no rows having a column enabled, it is possible also to select all the rows. However in my case some rows have a column that is enabled while others do not; Here only rows with enabled columns are available.

Has anyone experienced this same issue in the datawindow object inside PowerBuilder and if so do they have a solution? I tried to place some code in the rowfocuschanged() event but this did not solve my problem.

2

2 Answers

1
votes

Can you try below in clicked event of your dw?

if row = 0 then return
this.selectrow( 0, false)
this.selectrow( row, true)
this.setrow(row)
0
votes

Make sure that the columns has tab order set. the row selected in datawindow doesnt show as highlighted as the color is transparent. you can do something like this:

Datwindow details background set