DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 17 Aug 2007 09:09:49 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    JJ297
          2    Masudur
          3    Nathaniel Greene am


Tree Node Problem   
When I click on the Root it appears to double all of the nodes.  Is
there something in properities to turn this off?

Thanks!
Date:Fri, 17 Aug 2007 09:09:49 -0700   Author:  

Re: Tree Node Problem   
On Aug 17, 10:09 pm, JJ297  wrote:

> When I click on the Root it appears to double all of the nodes.  Is
> there something in properities to turn this off?
>
> Thanks!


Hi..

Are you filling the tree on tree note selecte event...?
please be a little more descriptive

Masudur
Date:Sat, 18 Aug 2007 09:10:07 -0000   Author:  

RE: Tree Node Problem   
Most likely you are populating your treenodes in Page_Load and you are not 
checking whether the page is posting back. 
Page_Load fires every time the page loads (even on postbacks).
The solution to this is - in Page_Load check to see if the page has posted 
back and if it is posting back then don't populate the treelist (because it's 
already been populated)

so (assuming you were using data binding) 
Page_Load(....)
{
  if (IsPostBack==false)
{
TreeView.DataBind();
// or 
PopulateTreeView();
}
}

in vb.net it would be 
if IsPostback=false then 
....
end if 

Hope this helps.

"JJ297" wrote:


> When I click on the Root it appears to double all of the nodes.  Is
> there something in properities to turn this off?
> 
> Thanks!
> 
> 
Date:Mon, 20 Aug 2007 06:26:03 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us