emin Posted November 14, 2020 Posted November 14, 2020 When I use DBTreeGrid, I encountered two problems and although I searched the forum, I could not find a solution. 1- If I add TreeKeyFields values at design time, fields is grouped accordingly. When I change these values at runtime, there is no change. However, it is effective if I recreate the treegrid. This is not a very effective solution either. Because it is not very logical to do this every time a query runs on the data source that DBTreeGrid is connected to. 2- When I query on which DBTreeGrid is connected, it automatically becomes Fullcollapse. I tried the following methods to make the tree FullExpand again when the query changes. However, there was no change. When I do the query and FullExpand process at the same time, it is not effective. After the query, when I click the button, FullExpand works. How can I solve the problem? The code I use is: query.sql.text: = 'xxxxx'; Query.open; UniDBTreeGrid1.FullExpand; Alternatively, I used the code below. But it didn't help. UniTreeMenu1.JSInterface.JSCode (# 1'.getStore (). Data.items.forEach (function (hand) {el.expand ()}); '); Quote
Sherzod Posted November 14, 2020 Posted November 14, 2020 7 hours ago, emin said: 2- When I query on which DBTreeGrid is connected, it automatically becomes Fullcollapse. I tried the following methods to make the tree FullExpand again when the query changes. However, there was no change. When I do the query and FullExpand process at the same time, it is not effective. After the query, when I click the button, FullExpand works. procedure TMainForm.UniFormReady(Sender: TObject); begin UniDBTreeGrid1.FullExpand; end; ? Quote
emin Posted November 14, 2020 Author Posted November 14, 2020 I added a video to demonstrate the problem. Quote
Sherzod Posted November 14, 2020 Posted November 14, 2020 47 minutes ago, emin said: I added a video to demonstrate the problem. function afterCreate(sender) { sender.getStore().on('load', function(){sender.expandAll()}) } Quote
fraxzi Posted April 24, 2021 Posted April 24, 2021 Hi @Sherzod How about changing the "TreeKeyFields" at runtime? Thanks in advance, Frances 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.