rtalmeida Posted April 23, 2017 Share Posted April 23, 2017 How can I do in a unitreeview, when the user select the parent automatically select the children? I'm using UseCheckBox = True. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 23, 2017 Share Posted April 23, 2017 Hi, To get started, try this: UniTreeView -> ClientEvents -> ExtEvents -> fn checkchange: function checkchange(node, checked, eOpts) { node.cascadeBy(function(n) { n.set('checked', checked); }); } Best regards, Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted April 23, 2017 Author Share Posted April 23, 2017 Thank you very much, it worked. Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted April 23, 2017 Author Share Posted April 23, 2017 Where can I find a manual with functions and procedures for ExtEvents and UniEvents? Quote Link to comment Share on other sites More sharing options...
GerhardV Posted April 24, 2017 Share Posted April 24, 2017 http://docs.sencha.com/extjs/4.2.2/#!/api/Ext Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted April 24, 2017 Author Share Posted April 24, 2017 Hello using the way you oriented it works visually, but how do I know it is checked? I made a small example that I'm sending. treeview.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 24, 2017 Share Posted April 24, 2017 Hello using the way you oriented it works visually, but how do I know it is checked? I made a small example that I'm sending. Hi, Of course, we will analyze these functions in the future, But can you try this approach for now?!: UniTreeView1 -> ClientEvents -> ExtEvents -> function checkchange: function checkchange(node, checked, eOpts) { var me = this; node.cascadeBy(function(n) { if (node != n) { me.fireEvent('checkchange', n, checked); n.set('checked', checked); }; }); } Best regards, Quote Link to comment Share on other sites More sharing options...
rtalmeida Posted April 24, 2017 Author Share Posted April 24, 2017 Hello, this way I can now check who is arriving or not, thank you very much one more time. Quote Link to comment Share on other sites More sharing options...
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.