nimarufa Posted January 17, 2019 Share Posted January 17, 2019 Hi, I've got one problem - after update data in TreeGrid the grid is auto collapsed. I need only update data and keep opened nodes open and closed nodes close. I'm attaching a sample. Way to repoduce: 1. Tap "Expand" or open some nodes. 2. Tap Update The thee will close all nodes automatically. Please help to solve it. Version 1.50.0.1480 Complete Link to comment Share on other sites More sharing options...
Sherzod Posted January 17, 2019 Share Posted January 17, 2019 Hi, 4 minutes ago, nimarufa said: I'm attaching a sample. ? Link to comment Share on other sites More sharing options...
nimarufa Posted January 17, 2019 Author Share Posted January 17, 2019 Sorry here is it DBTreeGridTest.zip Link to comment Share on other sites More sharing options...
nimarufa Posted January 21, 2019 Author Share Posted January 21, 2019 Please, any suggestions.... Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2019 Share Posted January 21, 2019 3 hours ago, nimarufa said: Please, any suggestions.... I will try to give you one possible solution a bit later 1 Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2019 Share Posted January 21, 2019 3 hours ago, nimarufa said: Please, any suggestions.... Can you try this approach ?! UniDBTreeGrid -> ClientEvents -> 1. UniEvents -> function beforeInit: function beforeInit(sender, config) { sender.expandedNodes=[]; } 2. ExtEvents -> function store.beforeload function store.beforeload(store, operation, eOpts) { var me=this.grid; me.expandedNodes=[]; me.getRootNode().cascadeBy(function(node) { if (node.data.expanded) { me.expandedNodes.push(node.data.id) } }); } 3. ExtEvents -> function store.nodeappend function store.nodeappend(sender, node, index, eOpts) { if (this.grid.expandedNodes && this.grid.expandedNodes.indexOf(node.data.id)!=-1) { if (node.parentNode.data.expanded) { node.expand() } else { node.data.expanded = true } } } 2 Link to comment Share on other sites More sharing options...
nimarufa Posted January 22, 2019 Author Share Posted January 22, 2019 Works great!!!! thanks a lot!!! 1 Link to comment Share on other sites More sharing options...
Sanyi Posted September 24, 2020 Share Posted September 24, 2020 Hi, and what about when I reopen the query? I want to see the same opened nodes. It is possible? Regard, Sándor Link to comment Share on other sites More sharing options...
Sherzod Posted September 24, 2020 Share Posted September 24, 2020 On 1/21/2019 at 5:09 PM, Sherzod said: me.expandedNodes=[]; Need to think about storing this value either in a cookie or on the server side... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now