TMSFMXTreeView does not call OnBeforeUpdateNode

Hi,


 I noted a problem. TMSFMXTreeView does not call OnBeforeUpdateNode the first time that the user try to edit (click over) an editable column.

To reproduce that, put an TMSFMXCheckedTreeView over a form and use this OnCreate event for the Form:

procedure TForm1.FormCreate(Sender: TObject);
var
  col: TTMSFMXTreeViewColumn;
begin
  TMSFMXCheckedTreeView1.BeginUpdate;

  col := TMSFMXCheckedTreeView1.Columns.Add;
  col.Text := 'Second Column';
  col.Width := 26;
  col.CustomEditor := True;

  col := TMSFMXCheckedTreeView1.Columns.Add;
  col.Text := 'Third Column';
  col.Width := 26;
  col.CustomEditor := True;

  TMSFMXCheckedTreeView1.EndUpdate;
end;

Use this OnBeforeUpdateNode event:

procedure TForm1.TMSFMXCheckedTreeView1BeforeUpdateNode(Sender: TObject;
  ANode: TTMSFMXTreeViewVirtualNode; AColumn: Integer; var AText: string;
  var ACanUpdate: Boolean);
begin
  if ANode.CheckStates[0] then
    ACanUpdate := False;
end;

Run the aplication, do a click over a model (leaving the checkbox unchecked) an then click over second or third column and you can edit that column because the OnBeforeUpdateNode is not called, then click over the other editable column and you can not edit this column because in this case OnBeforeUpdateNode is called.

Regards,
Ricardo

Hi,


The OnBeforeUpdateNode event is actually called before the node text is updated. Not before the editor is shown. To do this, please use the OnBeforeOpenInplaceEditor event.