query component afterscroll
DBGrid1.DataSource.DataSet.DisableControls;
WITH DBGrid1.SelectedRows DO BEGIN
IF COUNT > 0 then
SpeedButton1.Enabled := True
ELSE SpeedButton1.Enabled := False;
END; // WITH DBGrid1.SelectedRows DO BEGIN
DBGrid1.DataSource.DataSet.enableControls;