Hi,

Use a standard cCJdbGrids showing active records, when the user flips the constraint to show inactive records you get the CacheError on every row. Why?
Surely it’s normal for users to change Constraints at runtime! We would have expected the cache to rebuild when calling RefreshDataFromDD ready for MovetoFirstRow to use and display. When navigating through the grid, the selected row is looked up in the cache which always fails, prompting the setting of pbCacheError to TRUE. If you flip the constraint back the error goes away!


Object oShow_Cancelled_Licenses_bn is a cButton
Set Size to 14 90
Set Location to 5 556
Set Label to 'Show Cancelled Licenses'

Procedure OnClick
String sLabel
Get Label to sLabel

If (sLabel = 'Show Cancelled Licenses') Begin
Set pbCDD_Show_Cancelled of oProduct_Licenses_DD to True
Set Label to 'Show Live Licenses'
End
Else Begin
Set pbCDD_Show_Cancelled of oProduct_Licenses_DD to False
Set Label to 'Show Cancelled Licenses'
End
Send Rebuild_Constraints of oProduct_Licenses_DD
Send RefreshDataFromDD of oProduct_Licenses_dbGrid 0
Send MovetoFirstRow of oProduct_Licenses_dbGrid
End_Procedure

End_Object