TreeView in server control throws errors...

Discussion in 'ASP .Net Building Controls' started by cageman, Mar 8, 2007.

  1. cageman

    cageman Guest

    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, Mar 8, 2007
    #1
    1. Advertising

  2. cageman

    cageman Guest

    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?
     
    cageman, Mar 19, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    986
    Mark Goldin
    Jan 17, 2004
  2. keithb
    Replies:
    0
    Views:
    321
    keithb
    May 17, 2006
  3. Ionutz
    Replies:
    2
    Views:
    546
    Ionutz
    Oct 23, 2005
  4. AndrewF
    Replies:
    1
    Views:
    379
  5. Philip Herlihy
    Replies:
    1
    Views:
    114
    Philip Herlihy
    Dec 31, 2003
Loading...

Share This Page