I have a window which consists of multiple datawindow. When I click on the dw, the row changed, it gets the row correctly However, when I save this transaction, the row will not stay in the same row, but returning to the first row.
I do reset filter before save, and when remove the filter (setFilter('')), it triggers rowfocuschanged event, where getrow() and currentrow returns 1 instead of 4 (let's say selected row is 4).
It is the same when I set the filter.
I was thinking of the buffer, primary and filter buffer, but having no idea on how to solve it.
Please advise.
Thank you in advance
You have to reset the selection indicator manually. Since during the SetFilter process rows are brought back to the Primary! buffer from the Filter! buffer (and perhaps vice-versa) the currently selected row might not even be on the datawindow after the filter process. So you have to determine what unique row attributes there are, save them, then after the SetFilter you find the row again via the attributes and finally set the selected row.