jahlxx Posted April 1, 2016 Posted April 1, 2016 Hi. Has the tunitreeview the events on collapsing and onexpanding? Thanks. Quote
Sherzod Posted April 1, 2016 Posted April 1, 2016 Hi, At the moment, you can handle these events on the client side, using UniTreeView.ClientEvents Best regards. Quote
BantuKumar Posted April 1, 2016 Posted April 1, 2016 Hi. Has the tunitreeview the events on collapsing and onexpanding? Thanks. Hi, Directly you would not find these events in uniTreeView however you can use following events of uniTreeView.ClientEvents - collapse - expand Best Regards, Quote
jahlxx Posted April 2, 2016 Author Posted April 2, 2016 Hi. I can't fund clienevent, or I don't knpw how to use it. I need expandall the treeview, but in every expand of a node I need to do something. In an vcl app, with the treeview component standard of delphi, I write some code in the onexpand event of the node. then I do tree.expandall, and that's all. but in treevire of unigui, I don't know how to do this. some help please. thanks. Quote
jahlxx Posted April 2, 2016 Author Posted April 2, 2016 ok. thanks. but I don't know how to use it. sorry, I'm learning. Quote
rgreat Posted April 2, 2016 Posted April 2, 2016 In ExtEvents Client Code: function beforerender(sender, eOpts) { sender.addListener('afteritemexpand', function(node, index, item, eOpts) { ajaxRequest(sender,'expand',['id='+node.data.id]); }); } In ServerCode: procedure TMainForm.TV1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); var i,id : integer; begin if EventName='expand' then begin id:=StrToIntDef(Params.Values['id'],-1); for i:=0 to TV1.Items.Count-1 do begin if id=TWebTreeNode(TV1.Items[i]).Id then begin FillNode(TV1.Items[i]); Break; end; end; end; end; It will be similar code for collapse. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.