TIWCGJQTreeViewJSONPlugin.Ajax Property

The ajax config object is pretty much the same as the jQuery ajax settings object. You can set the data option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the data function will be sent to the server as data (so for example you can send the node's ID). You can set the url option to a function, that will be executed in the current tree's scope (this will be the tree instance) and gets the node about to be open as a paramater (or -1 for initial load). Whatever you return in the url function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2). The error and success functions (if present) also fire in the context of the tree, and if you return a value in the success function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree (for example some .NET json implementations require this to work: "success" : function (data) { return data.d; }.

Namespace: IWCGJQTreeView
published
 property Ajax: TIWCGJQAjaxOptions index 01 read GetAjax write SetAjax stored IsObjStored;

Property Value