Hello,
I'm making a treeview (Repeater -> ShowAsTree) of some data. The only problem i have is that the treeview is always collapsed by default. Is there any way to show the tree Expanded by default or expand it after data is loaded by some code? Thank you for any suggestions.
-Mihail- [MCTS]
0
Answers
http://www.epimatic.com
OnPageAll it says
IF ISSERVICETIER THEN
ExpandAll
ELSE
InitTempTable;
Does that solve your problem?
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
But for handling by code, you could try to do it with sendkeys. The expand/collapse toggle is ctrl+shift+Q
I have a similar situation, I want to modify Page 6520 Item Tracing so when to user hits button Trace the results will be shown in Expand All. It works in Classic Client but in RTC the code for Expand All, Collapse All is not available.
I thought about SendKeys but seems complicated since the shortcut Ctrl + Shift + Q is only for one line not for expand All. I didn't see any shortcut for Expand All. If I use this shortcut I would have to move from main page, after pushing Trace button, to the first line an then to all the other lines. I don't know if this is even possible, I must admit I'm quite new with pages.
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
We tried a long time, but finally we found a workaround for it!
Add this code to the OnOpenPage()-Trigger. The variable WshShell is an automation of the type "Windows Script Host Object Model.WshShell".
IF (ISCLEAR(WshShell)) THEN BEGIN
CREATE(WshShell, FALSE, TRUE);
END;
WshShell.SendKeys('+{F10}E{ENTER}');
// menu key + E + Enter
CLEAR(WshShell);
Note:
The keys to send depends on the language. This is working for ENU.
Derk
EDIT: the topic is now [solved]
as long as the filter pane is not visible :-k