on 10-07-2014 11:22 AM
Hi Everyone,
I am using PowerBuilder 11.1 build 8123.
I am protecting the column and changed the background mode of data window column through modify() function in user defined local function (where datawindow is argument type and pass by is reference). Data window have more than one row and one selected row. Before modify the column's, getrow() function return right selected row, but after modify it return any other row number. code is written in fwc_retrieve event.
I also use scrolltorow() and setrow() functions after modify(), but these have not worked.
In my application PFC is used. I don't able to find out the reason.
Please help.
Thanks,
Vikrant
It is unclear why you need to use the Modify() function to redefine the datawindow after your window has initialised. Try adding a condition to the protect and background properties of the column in the Datawindow painter at design time.
If you can only determine the condition at run-time, then use the Modify() function in the datawindow control constructor event (so is only run once), and supply a condition...
eg.
// Minor DOB protected on minor flag
object.minor_dob.background.mode="0~tif ( minor = 'Y', 0, 1 )"
object.minor_dob.protect="0~tif ( minor = 'Y', 0, 1 )"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikrant;
This is not a bug as a Modify ( ) method for a column affects all rows that the column is displayed under. Your probably getting the last row that the modified column was last operated on.
I would use the GetRow ( ) and GetSelectedRow ( ) to trap the current rows for the DWO you are about to modify and then when the update is completed, use the SetRow() and SelectRow () methods to re-establish the same row state on the passed DWO.
HTH
Regards ... Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.