Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > TreeView in server control throws errors...

Reply
Thread Tools

TreeView in server control throws errors...

 
 
cageman
Guest
Posts: n/a
 
      03-08-2007
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?
 
Reply With Quote
 
 
 
 
cageman
Guest
Posts: n/a
 
      03-19-2007
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.

"cageman" wrote:

> 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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
App configured as 2.0, throws event implying running as 1.1 in .net form browser control, works fine in IE jeremy ASP .Net 5 08-28-2006 10:30 AM
Dynamically added user control throws object not set andyrich_1@hotmail.com ASP .Net 1 01-03-2006 01:58 PM
Issue with a custom TreeView derived from the TreeView control Ionutz ASP .Net Web Controls 2 10-23-2005 03:23 PM
Help: Server.Execute throws exception in Application_Start frog ASP .Net 4 05-18-2005 09:02 PM
LoadControl() method throws virtual path error when attempting to load user control from subfolder. Jeremy ASP .Net 2 06-24-2004 05:57 AM



Advertisments