Hi there - bit of background, after something is added to the string grid, BtnEPOSadd is disabled. This bit of code is on the afterscroll event to check whether the item exists, as a way around the problem of duplicates in the string grid...
...However it's not working! Changing the current record seems to serve only to enable the button, even if the current record is already in the string grid...
Cheers in advance :D
procedure TFrmEPOS.EPOSQueryAfterScroll(DataSet: TDataSet);
var count : integer;
for count := 0 to Strrow do
if StrGridTransaction.Cells[0,Count] = EPOSQuery.FieldValues['ProductName']then
BtnEPOSadd.Enabled := false;
else BtnEPOSadd.enabled := true;