Grids - Refresh & change record

<< Click to Display Table of Contents >>

Navigation:  Forum >

Grids - Refresh & change record

Forum link

 


 

10-29-2021, 10:29 PM:

 

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

 


 

10-30-2021, 07:27 AM:

 

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() ;

 


 

10-30-2021, 02:57 PM:

 

Hi, in IWDBGrid i do:

 

IWDBGrid.DoRefreshControl := True;

 


 

11-01-2021, 02:41 PM:

 

FYI, what I found is that refresh does not work when the dataset is in edit mode.

 

That was my problem.