procedure TMainForm.MDDataTreeView1Changing(Sender: TObject; Node: TTreeNode;
var AllowChange: Boolean);
begin
if (FClickedNode <> nil) and (Node<>nil) then
begin
if FClickedNode.Level < Node.Level then
AllowChange := False;
end;
end;
procedure TMainForm.MDDataTreeView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
FClickedNode := MDDataTreeView1.GetNodeAt(X, Y);
if FClickedNode<>nil then
FClickedNode.Selected := True;
end;