Board index » delphi » DBGrid: How can I know which cell is selected in a DBGrid?

DBGrid: How can I know which cell is selected in a DBGrid?

Hi,

How can I know which cell is selected in a DBGrid?   Because I need to
change de value of a cell when a user select an item in a popupmenu
that appears when the user right click in a column.

Thanks

Patrick

 

Re:DBGrid: How can I know which cell is selected in a DBGrid?


Hi Patrick

  My way to do this is to create a TDBGrid descendant:

   TMyDBGrid = class(TDBGrid)
   private
   public
     // Redeclare TCustomGrid properties Col and Row
     property Col;
     property Row;
   published
   end;

  Then query its Col and Row values.

  Regards.

Arcturus.

In article <38d061c1.1289...@news.total.net>,

Quote
stama...@total.net (Jungle) wrote:
> Hi,

> How can I know which cell is selected in a DBGrid? Because I need to
> change de value of a cell when a user select an item in a popupmenu
> that appears when the user right click in a column.

> Thanks

> Patrick

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads