Recent

Author Topic: How to get Current cell's row and column number of a DBGrid?  (Read 36988 times)

Elmug

  • Hero Member
  • *****
  • Posts: 849
Hi everyone,

In trying to do an equivalent of OnCellEntered, I would appreciate help on how to get:

For the DBGrid (Or DataSet?):

1. The current cell's column number
2. The current cell's row number

I've searched much already, and don't seem to get some clear way out, so far.

Thanks for any help afforded.

paweld

  • Hero Member
  • *****
  • Posts: 1327
Re: How to get Current cell's row and column number of a DBGrid?
« Reply #1 on: July 24, 2012, 03:00:18 pm »
Code: [Select]
DBGrid1.SelectedIndex; //column
DBGrid1.DataSource.DataSet.RecNo; //row
Best regards / Pozdrawiam
paweld

Elmug

  • Hero Member
  • *****
  • Posts: 849
Re: How to get Current cell's row and column number of a DBGrid?
« Reply #2 on: July 25, 2012, 12:50:28 am »
Code: [Select]
DBGrid1.SelectedIndex; //column
DBGrid1.DataSource.DataSet.RecNo; //row

Thank you paweld.

I will try this out right today.

 

TinyPortal © 2005-2018