|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hiding a TreeView's root nodeWhat is the best (if there is such) way to hide a tree view's root node?
The RootNodeStyle property lacks a "visibility" property, so I can either assign a CssClass="Hidden", which translates to display:none or override the render method to manually do it, but I was curious if there is a better way that I'm not seeing. (I'd also ideally like to hide any node without a text label, but it isn't critical, whereas I really would like to remove the root altogether rather than just render it with no text) If you are binding an ASP.NET 2.0 Treeview control to a SiteMapDataSource
then you can simply set SiteMapDataSource.ShowStartingNode = false Show quoteHide quote "Keith Patrick" <richard_keith_patrick@nospam.hotmail.com> wrote in message news:eaTgSbu5FHA.1032@TK2MSFTNGP11.phx.gbl... > What is the best (if there is such) way to hide a tree view's root node? > The RootNodeStyle property lacks a "visibility" property, so I can either > assign a CssClass="Hidden", which translates to display:none or override > the render method to manually do it, but I was curious if there is a > better way that I'm not seeing. (I'd also ideally like to hide any node > without a text label, but it isn't critical, whereas I really would like > to remove the root altogether rather than just render it with no text) >
Finding a way to bind ASP.NET controls(two way) to a typed-dataset
Web Server Control and property tree in design time like Font has. Retrieve Datagrid Element Index by Name Postback in Web Controls client-side .NET control Retrieve GridView column header text on sort how to override DropDownList.SelectedValue property Coloring Calendar !!! DropDownList Combining 2 Fields Using ListBox.DataTextField |
|||||||||||||||||||||||