Jump to content

DbTreeGrid fullcollepse problem


emin

Recommended Posts

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 ()}); ');

Link to comment
Share on other sites

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;

?

Link to comment
Share on other sites

  • 5 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...