Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / March 2007

Tip: Looking for answers? Try searching our database.

TreeView in server control throws errors...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cageman - 08 Mar 2007 01:08 GMT
Hello All,

What is the proper way to add a TreeView, with child nodes, to a server
control?

I was getting two errors.  The first was quickly resolved by setting the
SkipLinkText = String.Empty;

The second one, however, doesn't appear to be as straight forward.  When you
envoke the RenderControl method of the TreeView it loses it's image
information.
Which means i cannot use any of the standard ImageSets and must define all
of my own plus signs and dashed lines?
cageman - 19 Mar 2007 20:20 GMT
Figured out my problem...

A TreeView needs to be added through the CreateChildControls()method,
this.controls.add(treeview), of a Server control.  You cannot add it by
overriding the Render method and Calling TreeView.Render(output);

A gridview also needs to be added to your server control via
CreateChildControls(), this.Controls.Add(gridview), or row buttons will not
handle click events.

> Hello All,
>
[quoted text clipped - 9 lines]
> Which means i cannot use any of the standard ImageSets and must define all
> of my own plus signs and dashed lines?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.