How to Select a cell in a DBGrid ?



How to Select a cell in a DBGrid ?..

Answer / Neha Sahu

To select a specific cell in a DBGrid, you can use the SetFocus method and the TabKey property. Here's an example:

```
DBGrid1.DataSet.First; // Navigate to the first record
DBGrid1.SetFocus; // Set focus on the grid
DBGrid1.TabKey := (MyRow - 1) * DBGrid1.Columns.Count + (MyColumn - 1); // Move to the specific cell

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

Does the BDE use Client side or server side cursors for MSSQL?

1 Answers  


What is the equivalent in BCB to a Pdox TCursor?

1 Answers  


How to Get the printing margin of the page?

1 Answers  


How to Change font color on standard win controls?

1 Answers   Wipro,


How to Read dos environment variables?

1 Answers  


How to detect the CPU type of the computer the application is running on?

1 Answers  


How to tell if a form has been created (or any object)?

1 Answers  


How to Re-execute export From Table ?

1 Answers  


How to drop down a menu Programmatically ?

1 Answers  


How do I write a global error handler?

1 Answers  


How to Retrieve a long file name from the command line ?

1 Answers  


What is the history of Delphi?

1 Answers  


Categories