Re: populate treeview from databas

From: Mike (Mike_at_discussions.microsoft.com)
Date: 12/01/04


Date: Wed, 1 Dec 2004 06:53:02 -0800

so i can't create the top layer nodes of the tree via code from the XML file
Like i can in VB.NET i have to code the headers manually?

I'm currently looking at some VB.NET code that does this already via code
nothing is hardcoded in the treeview, the entire thing is populated from a
XML dataset. I'm going to try to convert it to C# and see if it works.

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Mike,
>
> Yes, but you have to do it manually. You have to cycle through your
> XML, creating TreeViewNode instances and attaching them to the tree.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
> "Mike" <Mike@discussions.microsoft.com> wrote in message
> news:A702B3EC-3CAE-428E-8B02-6BB9D318F9A3@microsoft.com...
> > I'm getting the data from a web service via a dataset in XML format, can i
> > populate it from the XML dataset?
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >
> >> Mike,
> >>
> >> It all depends on the layout of your tables and the nature of the
> >> relations.
> >>
> >> However, regardless of what that layout is, there is no mechanism for
> >> populating a tree view from a data set, or list. You will have to create
> >> the tree view nodes yourself, creating the hierarchies.
> >>
> >> Hope this helps.
> >>
> >>
> >> --
> >> - Nicholas Paldino [.NET/C# MVP]
> >> - mvp@spam.guard.caspershouse.com
> >>
> >> "Mike" <Mike@discussions.microsoft.com> wrote in message
> >> news:62499AEA-7C3F-435E-BF7E-EDDBA8F4D855@microsoft.com...
> >> > how can i populate a treeview from a database?
> >> > websites with examples would help.
> >>
> >>
> >>
>
>
>



Relevant Pages

  • Re: Modeling Data for XML instead of SQL-DBMS
    ... It is a tree, ... A set of XML documents may include ... DBMS tools where the link specifications are metadata. ... but I don't think that is the hierarchy you ...
    (comp.databases.theory)
  • Re: TreeView Dynamic XML Binding
    ... Subject: TreeView Dynamic XML Binding ... Expand the ReturnHeader node. ... When I click on the tree node for the select ... I'm simply trying to display the xml element tree ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: TreeView with Recursive TreeNode....
    ... > head that he was trying to output a tree in html, ... The xml would possibly give you an advantage in already ... > "Mark Broadbent" wrote in message ... >> for mirroring this in a TreeView and this is probably correct. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Three Kinds of Logical Trees
    ... >>> That strikes me as a nonstardard definition of the use of metadata, ... >> metadata & data from an RDBMS into an xml dom tree. ... I think this is just a representation issue. ...
    (comp.databases.theory)
  • TreeView Dynamic XML Binding
    ... I'm dynamically binding an XmlDataSource to an xml file in the Page_Load event. ... When I click on the tree node for the select processing, a null reference error is displayed. ... Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)