TreeView in server control throws errors...

C

cageman

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

cageman

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top