MetalMickey Posted July 11, 2019 Share Posted July 11, 2019 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 11, 2019 Share Posted July 11, 2019 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? Quote Link to comment Share on other sites More sharing options...
MetalMickey Posted July 11, 2019 Author Share Posted July 11, 2019 Hi I'm using the trial but not sure exactly how to get the build number, there's a folder called uni-1.90.0.1500 if that helps? Quote Link to comment Share on other sites More sharing options...
herculanojs Posted March 4, 2020 Share Posted March 4, 2020 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? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2020 Share Posted March 4, 2020 59 minutes ago, herculanojs said: I am facing a problem with UniDBGrid in version 1.10.0.1472. Hi, Can you check it with the latest builds? Quote Link to comment Share on other sites More sharing options...
herculanojs Posted March 4, 2020 Share Posted March 4, 2020 I will test now in version 1.70.0.1486 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2020 Share Posted March 4, 2020 3 minutes ago, herculanojs said: I will test now in version 1.70.0.1486 Also try this with the latest builds. Quote Link to comment Share on other sites More sharing options...
herculanojs Posted March 4, 2020 Share Posted March 4, 2020 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2020 Share Posted April 8, 2020 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.