Posts: 19
Threads: 9
Joined: Mar 2020
Reputation:
0
Location: Canada
10-29-2021, 10:29 PM
(This post was last modified: 10-29-2021, 10:31 PM by StephanM.)
I need a little help with grids.
1. When I post changes, the grid is not refreshed to show the changes.
2. When I click on a row in a grid, the record is not selected.
I see the page reload, but the first row is always selected.
I just got the latest release v15.2.41
Thank for any advice
Posts: 19
Threads: 9
Joined: Mar 2020
Reputation:
0
Location: Canada
10-30-2021, 07:27 AM
(This post was last modified: 10-30-2021, 07:28 AM by StephanM.)
I found the answer to question 2.
You assign an event to the grid's first column's OnClick event (not OnAsyncClick) and locate the new record there.
Still looking for a way to refresh the grid with changed data.
I tried the following but no success.
grid->Invalidate() ;
grid->Repaint() ;
grid->RepaintControl() ;
grid->Refresh() ;
Posts: 288
Threads: 0
Joined: Mar 2018
Reputation:
29
Location: Franca-São Paulo-Brasil
Hi, in IWDBGrid i do:
IWDBGrid.DoRefreshControl := True;
Posts: 19
Threads: 9
Joined: Mar 2020
Reputation:
0
Location: Canada
FYI, what I found is that refresh does not work when the dataset is in edit mode.
That was my problem.