Link to home
Start Free TrialLog in
Avatar of Leo01010101
Leo01010101

asked on

BCB6 DBGrid - is it possible to fix position of selected record in DBGrid window after editing?

Hi, I'm looking for a solution, which allow to fix position of selected record in DBGrid window. Now when I'm executing 'DisableControls' than change selected records in background and come back to previous selected record and execute 'EnableControls' this selected record is often displayed in other position than before. In this reason selected record jumps in DBGrid window makes confusion ( looks like selected record was changed). Is it possible to solve this problem?
Avatar of sarabande
sarabande
Flag of Luxembourg image

you can use SelectedIndex  to set the selected row to a record. you can use the function ScrollIntoView to get the same top line as before.

Sara
Avatar of Leo01010101
Leo01010101

ASKER

I'm not sure where I can find ScrollInfoView function for BCB6?
ASKER CERTIFIED SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm not sure how to call this function from DBGrid of BCB6?

Leo