Overriding TwwDBGrid.ToggleCheckBox method in a descendant class

Comments

2 comments

  • Roy Woll

    You can detect a field value change using the OnFieldChanged event. This should fire after you toggle the checkbox. Note: If you need to override, you would use the DoFieldChanged event.

     

    procedure TBtnGridForm.wwDBGrid1FieldChanged(Sender: TObject; Field: TField);
    begin
      if (Field<>nil) and (Field.fieldName = 'Buyer') then
      // Value changed

    end;

    0
    Comment actions Permalink
  • Laercio Amici

    Ok, I'll try this approach.

    By the way, all that I need is to do an auto post when the user clicks on a checkbox field on the grid.

    So, I think that ToggleCheckBox() is the best place to do this, and I think that having an option flag on TwwDBGrid for this would be a good feature on a future release.

    Thanks Roy.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk