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

Posted on 2013-10-08
Medium Priority
Last Modified: 2013-11-25
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?
Question by:Leo01010101
  • 2
  • 2
LVL 35

Expert Comment

ID: 39561930
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.


Author Comment

ID: 39564993
I'm not sure where I can find ScrollInfoView function for BCB6?
LVL 35

Accepted Solution

sarabande earned 1000 total points
ID: 39568015
it is ScrollIntoView and it is DataGrid member function.

see http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid_methods.aspx


Author Comment

ID: 39570168
I'm not sure how to call this function from DBGrid of BCB6?


Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question