DBGrid - OnCheckBoxCanToggle?

Hi,

i like to validate if a Value is set in an Edit-Field (Username) before changing an entry in the Database (edited -> Checkbox).
I thought the OnCheckBoxCanToggle-Event is the best place for this.
Here's my Code:

procedure TForm1.DBAdvGrid1CheckBoxCanToggle(Sender: TObject; ACol,
  ARow: Integer; State: Boolean; var Allow: Boolean);
begin
    Allow := False;
    if Trim(edUser.Text) = '' then begin
        ShowMessage('Please enter your Username.');
        exit;
    end;
    Allow := True;
    // from here the Checkbox should be changed
end;

Unfortunately the Checkbox-Value is always changed, even if Allow is False.
Where's my mistake?

Thanks.

There was an issue with handling this from the TDBAdvGrid that descends from TAdvStringGrid. We fixed this and the next update will address this.