CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/29/2008 9:53:57 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
momoski
Asp.Net User
HELP: SelectedNode problem1/29/2008 9:53:57 PM

0/0

I have read a lot of posts about selectednode, but I couldnt find my problem or solution. I by any chance I missed it, I apologize.

My problem:

I am using a treeview that is populated dynamically by using the PopulateOnDemand property. When the page is loaded, the first level of child nodes is loaded. Those childnodes become bold when selected and the navigation to the given target and url works fine. The node becomes bold because of the selectednode-style-fontbold property set on the control. So far so good.

When expanding a node on the first level the childnodes are populated as expected and the target and url properties are working correctly. However when selecting one of those childnodes, the node does not become bold and cannot be retrieved by selectednode. The parentnode that was bold remains bold.

a piece of code:

public void PopulateNode(Object source, TreeNodeEventArgs e)

{

foreach (item x in list)

{

TreeNode newNode = new TreeNode(name, value, imgurl);

newNode.Target = "CenterPanel"; //this is the iframe

newNode.NavigateUrl ="myPage.aspx?id=" + name;

newNode.PopulateOnDemand = true; //I know this node has children

newNode.SelectAction = TreeNodeSelectAction.Select;

node.ChildNodes.Add(newNode);

}

The above works for the first level but not for the next levels. I got it to work only in one way: By setting the ExpandDepth to e.g. 20. In that case the whole tree gets populated and then all the nodes can be selected and show the nodeselectedstyle.

What am I missing.

Kind regards, Momoski

Mansoor Ali Sad
Asp.Net User
Re: HELP: SelectedNode problem1/30/2008 1:51:41 AM

0/0

Can try this ...... 

protected void PopulateNode(object sender, TreeNodeEventArgs e)

{

switch (e.Node.Depth)

{

case 0:

BindParent(e.Node);

break;case 1:

BindChild(e.Node);

break;

}

}


Thanks.

Please mark the post as answer if it helps you!!!





momoski
Asp.Net User
Re: HELP: SelectedNode problem1/30/2008 6:08:25 AM

0/0

Sorrry I didnt put the complete code in here, but there is a switch case statement around it determining which nodes to load. I think in the first populatenode (when level is 0) goes during the first load of the page (because expanddepth is at 1). Then with the second load after expanding a node on level 1 it only fires populatenode and loads the nodes for level 2. I think the tree then 'forgets' it has also the nodes at level 0 and 1 loaded. I'm going to try to load the tree fully at once starting from level 0 (this probably will take time to load the first time). I think that will work. If it works I'll post a message. 

momoski
Asp.Net User
Re: HELP: SelectedNode problem1/30/2008 6:25:58 AM

0/0

So it works when loading the whole tree at once. I am still looking for achieving the same with partial populating (populateondemand)

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
RibbonX For Dummies Authors: John Paul Mueller, Pages: 404, Published: 2007
Advances in Information Retrieval: 29th European Conference on IR Research, ECIR 2007, Rome, Italy, April 2-5, 2007 : Proceedings Authors: Giambattista Amati, Claudio Carpineto, Giovanni Romano, Pages: 759, Published: 2007
Mastering System Center Operations Manager 2007 Authors: Brad Price, John Paul Mueller, Scott Fenstermacher, Pages: 431, Published: 2007
Human-computer Interaction: Theory and Practice Authors: Michael Smith, Julie A. Jacko, Constantine Stephanidis, Don Harris, Vincent Duffy, Pages: 5800, Published: 2003
Perspectives of System Informatics: Third International Andrei Ershov Memorial Conference, PSI '99, Akademgorodok, Novosibirsk, Russia, July 1999 : Proceedings Authors: Dines Bjørner, M. Broy, Alexandre V. Zamulin, Pages: 540, Published: 2000
Java & XML: Solutions to Real-World Problems Authors: Brett McLaughlin, Pages: 509, Published: 2001
Information Retrieval Technology: Second Asia Information Retrieval Symposium, AIRS 2005, Jeju Island, Korea, October 13-15, 2005 : Proceedings Authors: Gary Geunbae Lee, Akio Yamada, Helen Meng, Sung Hyon Myaeng, Pages: 735, Published: 2005
Computational Complexity Authors: Klaus Wagner, Gerd Wechsung, Pages: 551, Published: 1986
Computational Geometry: Algorithms and Applications Authors: Mark de Berg, Marc Van Kreveld, Mark Overmars, Otfried Schwarzkopf, Pages: 367, Published: 2000

Web:
HELP: SelectedNode problem - ASP.NET Forums HELP: SelectedNode problem. Last post 01-30-2008 1:25 AM by momoski. 3 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
TreeViewAdapter Automatic re-expansion to the selected node ... TreeViewAdapter Automatic re-expansion to the selected node problem. Rate It (1) . Last post 11-30-2006 5:54 AM by St. Ingo. 8 replies. ...
Treeview selectednode problem/question - .NET C# Treeview selectednode problem/question. ... Any help will be most appreciated. .... 191125 Experts ready to help you find a solution. ...
TreeView SelectedNode - problem C# Friends TreeView SelectedNode - problem Posted: 18 Feb 2005 04:33 PM ... Any help would be appreciated. Also, how can I put folder icons in after populating the ...
.NET csharp TreeView selectednode ghosting problem TreeView selectednode ghosting problem - bsturg21. 29-Oct-07 04:21:29. Hello, I have an app that has a custom treeview which inherits the base treeview ...
Treeview problem, get value from selected node in another ... Talk about Treeview problem, get value from selected node in another ... General Computer Discussion, General Help Related Topics, Hardware ...
SelectedNode wrong when SelectedNodeChanged event fires the SelectedNodeChanged event. Only problem is, the treeview.SelectedNode points to the wrong node within the event code. Can anyone help? ...
TreeView SelectedNode and Highlighted Node problem - MSDN Forums Apr 30, 2007 ... I am facing a problem with treeview's selectedNode. I have to ... I have tried using after select event and it doesn't help. Thanks! ...
Why is my asp:TreeView selected node reset when in an UpdatePanel ... The problem happens when I click any of these buttons again. The selected node of the treeview seems to remember the previously selected node and the ...
Treeview Focus problem I have a problem with MyTreeview.selectedNode = MyNode. I have a large tree ... EnsureVisible won't help. You'll need P/Invoke and ...




Search This Site:










wishes for next release

starting a blog

dynamically retrieve a pages tabid

full trust to medium trust

can i ask how to create log file to record user activity.... ??

string formatting

a little off topic, but looking for a really good vista forum to post questions to

setcache and user session

increasing security: non-reversible passwords and more

how to strip source of embedded files from deployed folder

use of string functions on white spaces

column and web part dragging

send image behind text ??

webpage update problem

why storing the credentials in web.config file

solpart submenu mis-alignment only in ie!

serialization - xml string

strange error message

godaddy / dnn / resourcepack

web application not working

how can display like profile page in this forum

i have a mysterious empty entry in my drop down list? any ideas why?

adding a line-break in a treeview node?

extending/scaling down the built in contacts module

treeview expand question

best practice suggestions for uploading photos and photo information.

login user control in vb.net

decrypt a string with cer file

login id location

custom code

 
All Times Are GMT