Reputation: 9
I have a data window with a checkbox. I want to disable the selected rows. How can I do that? Also, please explain to me the code below. I saw it online and it works fine but it only disable the first selected row. Thank you
dw_unreportedprall.object.sel.protect = '0~tif(GetRow()=' + string(ll_ctr) + ',1,0)'
Upvotes: 0
Views: 1178
Reputation: 1
Reverse the last two number
dw_unreportedprall.object.sel.protect = '0~tif(GetRow()=' + string(ll_ctr) + ',0,1)'
It will protect all but not the new row.
Upvotes: 0
Reputation: 2407
I assume the variable 'll_ctr' holds the value for the row you are checking. If so you could try:
...'0~tif(IsSelected(' + string(ll_ctr) + '),1,0)'
Your code only works on a single row because the GetRow() method only gives you the current row (the one with focus) in a datawindow.
Upvotes: 0