Welcome Guest Search | Active Topics | Sign In | Register

Treeview Options
dios
Posted: Wednesday, August 13, 2008 6:56:29 AM
Rank: Member
Groups: Member

Joined: 8/13/2008
Posts: 14
I have a dynamic treeview implemented and it works great. The only thing i want to change about it is that my menu should be expanded (all nodes), not collapsed. At this time al nodes of the menu are collapsed. Can anybody help me to make it all expand by default?

Thanks in advance,
Anthony Van den bossche
Junior Web Developer
eo_support
Posted: Wednesday, August 13, 2008 8:14:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

I believe you can call ExpandAll method on the server side to expand all nodes:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeView.ExpandAll.html

Thanks!
dios
Posted: Wednesday, August 13, 2008 11:57:26 AM
Rank: Member
Groups: Member

Joined: 8/13/2008
Posts: 14
eo_support wrote:
Hi,

I believe you can call ExpandAll method on the server side to expand all nodes:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeView.ExpandAll.html

Thanks!

I used this code and it only works for one of my rootnodes. Do you see any other way?

Thank you very much,
Anthony.
eo_support
Posted: Wednesday, August 13, 2008 12:05:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

We are not aware of any problem with ExpandAll. You may want to check when ExpandAll is called. The function will not expand all nodes that are added after it is called.

The ultimate way is to set each node's Expanded property to true. This is actually what ExpandAll does ---- it recursively walk through the whole TreeView and set each Node's Expanded to true.

Thanks
dios
Posted: Sunday, August 17, 2008 4:10:58 AM
Rank: Member
Groups: Member

Joined: 8/13/2008
Posts: 14
Hi,

in my PageLoad event i have the following:

// Populate from the data source (mainTable);
Menu1.DataBind();
Menu1.ExpandAll();

So after the Databind() function i tell the object to ExpandAll().

This doesn't do the trick. I have also tried, in the .aspx page, to set all nodes hardcoded to ExpandAll

Note: i made the treeview dynamic, maybe this has got something to do with this problem.

Thank you already for your quick replies! If only every Forum gives such good answers on short notice...

Greetings,
Anthony.
eo_support
Posted: Sunday, August 17, 2008 7:38:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
dios wrote:
I have also tried, in the .aspx page, to set all nodes hardcoded to ExpandAll


We tried the following steps and it works fine:

1. Create a blank Web Form;
2. Place a TreeView inside the Form. Right click the TreeView to bring up the TreeView Builder and initializes it with any built-in template rather than the free one (the free ones has no items);
3. Inside the page's Page_Load event, call TreeView1.ExpandAll();

Run the page and you would see all the nodes are expanded.

You can try the same and see if it works for you. If the problem continues, we would need you to create a test page to demonstrate the problem. We will need to run the page, so try to change the code so that it does not rely on your database (for example, you create create the DataTable object by code) or any other of your code. We will look into it as soon as we have that.

Thanks!
dios
Posted: Wednesday, August 20, 2008 1:37:23 AM
Rank: Member
Groups: Member

Joined: 8/13/2008
Posts: 14
Hi,

the problem seems to be persistent. I can place the project online and give you acces via FTP through a login and password. Would this be Ok for you? If it's ok i can PM you the credentials or email them.

I do have an idea what the problem might be, but it is just a guess.. Whenever i add a rootnode, that node stays open. all the other (root)nodes before the newly created one close up. Is it because i can have only 1 rootnode? Below is printscreen of my database driven treeview.



Greetings,
Anthony.
eo_support
Posted: Wednesday, August 20, 2008 4:47:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

Yes. Placing the project online should be a good way for us to see what's going on. We are not aware of any problems as regard to one root node. So we will have to look into it and see.

Thanks
dios
Posted: Wednesday, August 20, 2008 7:52:52 AM
Rank: Member
Groups: Member

Joined: 8/13/2008
Posts: 14
Hello,

i have emailed you the FTP credentials and the online location of the website. In case you did not receive anything, you can mail me directly via anthony@dcinet.be

Thanks for your time,
Anthony.
eo_support
Posted: Wednesday, August 20, 2008 8:35:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

Yes. We have received that and will be looking into it as soon as possible.

Thanks!
eo_support
Posted: Wednesday, August 20, 2008 10:01:39 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

We looked into your code. You need to clear SingleExpandMode for the TreeView. With that property set, the TreeView will only expand one node at any given time.

Thanks!
dios
Posted: Thursday, August 21, 2008 12:24:44 AM
Rank: Member
Groups: Member

Joined: 8/13/2008
Posts: 14
Hello,

my treeview works perfectly. From now on i am only using eo objects Angel . BTW i love the HTML editor, finally an alternative for the FreeTextBox.dll shait.
Great support!

Greets,
Anthony.
eo_support
Posted: Thursday, August 21, 2008 6:44:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Excellent. Glad to hear you love our product!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.