Preselect a Row in a Browse when Window Opens

Hi all,

If i open a browse, i want preselect a row. How i can do this? As default the first row is every time selected.

Thanks a lot.

Are you using ABC or Legacy templates?

Hi Carl,

Thank you for your reply.

Yes it is an ABC Template Browse.

Regards Rob

Make sure you fetch the record you want to position to just after the tables are opened. That around priority 7600 in ThisWindow.Init().
Then add this line at priority 7900 in the ThisWindow.Init method. That’s just after the BRW1.Init method call.

  brw1.StartAtCurrent = true !open the browse to the row for the record currently in the file buffer

If your browse class is something other than BRW1, then change to match.

1 Like

Thx that works fine :slight_smile: