Hi, Pawel -
You do not need to re-position the vertical scroll bar. Instead, tell the DataWindow control which row you want to be able to see via the ScrollToRow() method, and let it determine what scrolling (if any) is needed:
* * * Edited to remove unnecessary SetRow method call. * * *
// Optional: Temporarily suspend re-painting of the DataWindow (this can reduce flicker).
dw_1.SetRedraw(False)
// Make row 723 visible within the DataWindow control and make it the current row.
dw_1.ScrollToRow(723)
// Optional: Highlight row 723.
dw_1.SelectRow(0,False) // Turns highlighting for ALL rows off.
dw_1.SelectRow(723,True) // Turns highlighting on for row 723.
// Optional: Set the current column to the one that contains the validation error.
dw_1.SetColumn("customer_id") // For example...
// Optional: Re-enable live display of the DataWindow's contents.
dw_1.SetRedraw(True)
Best regards, John
Just a small detail: There's no need to do a SetRow() after having done a ScrollToRow().
regards