Home - Forums-.NET - FlyTreeView (ASP.NET) - Making selected node the top node

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Making selected node the top node
Link Posted: 21-Aug-2007 08:18
When I select a node which is outside the display when the postback is done, I use the .FocusNode to focus on that node again.

The 'problem' is, I dont want that focused node on the bottom of the treeview, I really would like to make the treeview scroll down to make the selected node appear on the top.

Is this possible?
Link Posted: 21-Aug-2007 08:56
Currently, the FlyTreeView calls .focus() or .scrollIntoView() functions to make nodes visible when it is rendered in browser.
By default it uses bottom alignment of the focused node.

Anyway I can say it possible, but the FlyTreeView client-side javascript should be modified to achieve this functionality.

If you're interested, I can create a modified version of FlyTreeView that aligns focused node at the bottom. It will take few minutes.
Link Posted: 21-Aug-2007 09:01
Also, I should mention, the FlyTreeView contains ScrollTop and ScrollBottom that you can modify to set particular top and bottom position of the scrolled content of flytreeview.

I do not know whether it helps you or not, just in case.
Link Posted: 21-Aug-2007 09:18
[quote="EvgenyT"]Currently, the FlyTreeView calls .focus() or .scrollIntoView() functions to make nodes visible when it is rendered in browser.
By default it uses bottom alignment of the focused node.

Anyway I can say it possible, but the FlyTreeView client-side javascript should be modified to achieve this functionality.

If you're interested, I can create a modified version of FlyTreeView that aligns focused node at the bottom. It will take few minutes.


That would be great, we are currently rebuilding an old ASP/Javascript based website into .NET and they want exactly the same functionality as they got now.

Is it maybe possible to give the .Focus function another parameter? Maybe make it optional to either have the focussed node on top or bottom of the visible fram?
Link Posted: 21-Aug-2007 09:20
[quote="EvgenyT"]Also, I should mention, the FlyTreeView contains ScrollTop and ScrollBottom that you can modify to set particular top and bottom position of the scrolled content of flytreeview.

I do not know whether it helps you or not, just in case.


I don't think that is the solution, this will scroll to a certain position in the scrollbar, right? Well because the position is actually unknown (I think) because ANY node can be selected and getting the position of that node on the scrollbar could be hard.
Link Posted: 21-Aug-2007 09:38
We can schedule this functionality for our next release, but I cannot promise that it will be included, since it should be widely debugged.

We compiled a special version of the control.
Please check it out from:

http://download.9rays.net/treeview_asp.net_2/flytreeview_43_depl0y.zip
Link Posted: 21-Aug-2007 09:50
[quote="EvgenyT"]We can schedule this functionality for our next release, but I cannot promise that it will be included, since it should be widely debugged.

We compiled a special version of the control.
Please check it out from:

http://download.9rays.net/treeview_asp.net_2/flytreeview_43_depl0y.zip


Thanks a lot! I just downloaded it and installed it to the same location as I installed the normal 4.3. I put a new reference in my project to the new 'NineRays.WebControls.FlyTreeView.dll'.

Only now when I compile my application and I browse to my page, I get 2 javascript messages.

1 error:
Error: _f$54 is not defined
Source File: http://localhost:59228/Default.aspx
Line: 93

1 warning:
Warning: Error in parsing value for property 'display'.  Declaration dropped.
Source File: http://localhost:59228/Default.aspx
Line: 0

Line 93 of my default.aspx contains nothing but  commented lines of code.

Hope you can help me here, because the previous version of the Treeview (the normal 4.3) worked like a charm ;). I did delete all my cache's and restarted my browsers, so I dont think it is JS caching.
Link Posted: 21-Aug-2007 10:04
This sounds incredible.
We just changed two lines.


Do you get the same error when running standard FlyTreeView demo app?
Link Posted: 21-Aug-2007 17:56
Deleted the reference again, rebuild my application (with the obvious errors) and included the reference again.

Now my application works again! Thanks a lot for your quick response.
Link Posted: 12-Aug-2010 08:06
Was this ever included in a new version of the control?