Jump to content

TUniDBGrid SelectedRow


MetalMickey

Recommended Posts

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

 

Link to comment
Share on other sites

20 minutes ago, MetalMickey said:

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

Hello,

Can you please specify which edition and build of UniGUI are you using?

Link to comment
Share on other sites

  • 7 months later...

I am facing a problem with UniDBGrid in version 1.10.0.1472.
For some reason that I cannot identify, the grid does not synchronize with the position of the DataSet, and is always parked on the first data record.
The grid is selected one record, but the dataset is in another.
And when there is only one data record in the grid, SelectedRows.Count always shows zero, even if the record is selected.
Is there anything we can do about it?Capturar.thumb.JPG.d4abe9989182c721634f046b9d1ec5bf.JPG

Link to comment
Share on other sites

  • 1 month later...
On 3/5/2020 at 1:58 AM, herculanojs said:

Problem persists ver 1.70.0.1486

If there is only one record on screen, SelectedRows.Count always points to zero.

And the selected record is always locked in the first record of the grid / page

Hi,

Sorry for the late response.

Have you been able to check this on the latest builds?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...