Jump to content

MetalMickey

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by MetalMickey

  1. Hi

    I'm trying to find the best way of determining if a row is selected in a DBGrid when a button is pressed.  

    I started with CurrRow which returns 0 for the first row but also returns 0 when there's no row, I expected -1 when no row is selected.

    I then tried SelectedRows.Count but this seems to work only intermittently, it seems to work when the grid is first loaded using the default selected row (i.e. the first row is automatically selected), but once a different row is selected then SelectedRows.Count always returns 0.

    What's the best way to do this?

    I would also consider adding the buttons into the rows directly but I have no idea how to do this, any pointers appreciated.

    Thanks

    Chris

     

×
×
  • Create New...