Posted 25 July 2018, 7:29 pm EST
Hi,
The ultimate reason for the unstable state of TDBGrid8 results because updating the same fields in the recordset and the grid generates a conflict for the checkboxed field. In grid6, changes to the recordset inside the BeforeColUpdate event were ignored and the buffered values in the grid overrode the changes to the recordset even if the grid column changes occurred first. This may be the reason you are coding for grid6 set the field/column value both in the grid and in the recordset. With grid8, the proper response is achieved by setting either the recordset values or the grid field values but not both.
e.g:
Select Case ColIndex
Case EnumColumnaAplicacionAplicar ' Aplicar
'tdbgrdAplicacion.Columns(EnumColumnaAplicacionVlrAAplicar).Value = 0
recAdoAplicacion.Fields("valoraaplicar").Value = 0
'tdbgrdAplicacion.Columns(EnumColumnaAplicacionVlrPPago).Value = 0
recAdoAplicacion.Fields("valorprontopago").Value = 0
End Select
Only setting the recordset values OR only the grid Column values avoids the unstable state.
The state becomes unstable when the buffered grid column values no longer match the field values of the recordset. When that occurs, the grid refetches the data, but this generates the conflict between the half applied boolean field/checkbox column as the recordset value is opposite that of the changing grid value.
Therefore, grid 8 behavior is correct and the grid 6 behavior is not. This change is not unique to grid 8 but was also present in grid 7, with the change taking place more than 16 years ago.
Another alternative for you is to set the boolean field/column value in the BeforeColUpdate event as well, but this will only work with the latest drop, build 381.
http://prerelease.componentone.com/hotfixes/activex/TrueDBGrid8_8.0.20182.381.zip
http://prerelease.componentone.com/hotfixes/activex/list8_8.0.20182.371.zip
~Pragati