TIWCGJQCustomDynaTree.OnGetChildrenNodes Event
Assign this event for ajax loading of children.
![]() |
---|
You should set the "isLazy" attribute of parent node to true . |
public property OnGetChildrenNodes: TIWCGJQDynaTreeGetChildrenNodesEvent read FOnGetChildrenNodes write SetOnGetChildrenNodes;
- If you are using the OnGetRootNodes or OnGetRootNodesEx events to fill the root node:
procedure TIWForm1.IWCGJQDynaTree1GetRootNodes(Sender: TObject; var AJSon: ISuperObject); var NodeJSon: ISuperObject; I: Integer; begin AJSon:= TSuperObject.Create(stArray); for I := 0 to 5 do begin NodeJSon:= SO(); NodeJSon.S['key']:= 'key' + IntToStr(i); NodeJSon.S['title']:= 'Root ' + IntToStr(i); NodeJSon.B['isLazy']:= True; // <--- you need set this attribute NodeJSon.S['mytestattr']:= 'yooo'; AJSon.AsArray.Add(NodeJSon); end; end;
- If you are using the Nodes collection:
Node.IsLazy:= True;