Jump to content

DbTreeGrid fullcollepse problem


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...