Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Frames/Treeview and ASP.NET


Message #1 by "Daniel Ha" <dha@c...> on Mon, 22 Jul 2002 06:08:09
I'm trying to create a frameset with a treeview similar to the one seen on 
MSDN. So on the left frameset, there is a treeview web control. The centre 
frameset (where the contents are displayed) shows the contents of a 
document selected from the treeview. 

What I would like to do is to have the treeview web control highlight the 
node for the document that is displayed in the centre frame. 

There are two questions being asked here. 

First, how do you "select" and expand to a node in the treeview 
programmatically? 

Second, how can you control a treeview that is in a different frame? 

I'm using C# and VS.NET. 

Any help would be much appreciated.
Message #2 by Elissa Setarehshenas <elissasetareh@y...> on Tue, 23 Jul 2002 05:44:50 -0700 (PDT)
Daniel,

Everything you want to do is available through Visual
Studio. 
You can set the default, hover and selected styles of 
 the tree to appear as you like for the whole tree or
each node individually. You can set the NavigateUrl
and the Target there as well

 You  don't have to set them programmatically but if
you do here's how
myTreeView.SelectedNodeIndex=e.NewNode (if you know
the node number then use 
myTreeView.SelectedNodeIndex="1.4"
 
Hope this helps,
Elissa

--- Daniel Ha <dha@c...> wrote:
> I'm trying to create a frameset with a treeview
> similar to the one seen on 
> MSDN. So on the left frameset, there is a treeview
> web control. The centre 
> frameset (where the contents are displayed) shows
> the contents of a 
> document selected from the treeview. 
> 
> What I would like to do is to have the treeview web
> control highlight the 
> node for the document that is displayed in the
> centre frame. 
> 
> There are two questions being asked here. 
> 
> First, how do you "select" and expand to a node in
> the treeview 
> programmatically? 
> 
> Second, how can you control a treeview that is in a
> different frame? 
> 
> I'm using C# and VS.NET. 
> 
> Any help would be much appreciated.


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
Message #3 by "Daniel Ha" <dha@c...> on Tue, 23 Jul 2002 17:30:47
Elissa,

I would like to control the treeview programmatically from another frame. 
So that when a page loads in the main (centre) frame, the treeview in the 
left frame will automatically expand to the node with the title of the 
document currently being viewed in the main (centre) frame. 

I problem is how to interact with controls that are physically on another 
frame page. It's simple to interact with controls on the same page (just 
call it by it's name. e.g. MyTextBox.Value), but what if the control is on 
another page that is in view (like in a frameset)? 

Any ideas?

Thanks.


> Daniel,

Everything you want to do is available through Visual
Studio. 
You can set the default, hover and selected styles of 
 the tree to appear as you like for the whole tree or
each node individually. You can set the NavigateUrl
and the Target there as well

 You  don't have to set them programmatically but if
you do here's how
myTreeView.SelectedNodeIndex=e.NewNode (if you know
the node number then use 
myTreeView.SelectedNodeIndex="1.4"
 
Hope this helps,
Elissa

--- Daniel Ha <dha@c...> wrote:
> I'm trying to create a frameset with a treeview
> similar to the one seen on 
> MSDN. So on the left frameset, there is a treeview
> web control. The centre 
> frameset (where the contents are displayed) shows
> the contents of a 
> document selected from the treeview. 
> 
> What I would like to do is to have the treeview web
> control highlight the 
> node for the document that is displayed in the
> centre frame. 
> 
> There are two questions being asked here. 
> 
> First, how do you "select" and expand to a node in
> the treeview 
> programmatically? 
> 
> Second, how can you control a treeview that is in a
> different frame? 
> 
> I'm using C# and VS.NET. 
> 
> Any help would be much appreciated.


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

  Return to Index