treeview, and xml. for xml auto option of tsql

 I have a treeview, and it has to be find at runtime.

Since all the data is coming from the database, what would be the best idea to work with it. 


1) thought of a solution that I can bind it with sitemap, but it would be static. 

2)I thought that I should send the data to the page create an xml document on fly and then bind it with the treeview. That could be one option but not sure how to execute it.

3) Then there is another option, is to send the data as in xml format  to Dataset and bind the dataset to treeview control. Is it achiveable??? If I could do this then there would no need to deleting the existing xml file and then deleting it and I wouldn't have to write codes for it.  For example this is the select statement the part of the sp:

FROM Customers  
   JOIN Orders  
      ON Customers.CustomerID = Orders.CustomerID  
WHERE Customers.CustomerID IN ( 'ANTON''CHOPS' )  



 This is what it return:
<Customers CustomerID="ANTON" CompanyName="Antonio Moreno Taquería">  
  <Orders OrderID="10365" OrderDate="1996-11-27T00:00:00" />  
  <Orders OrderID="10507" OrderDate="1997-04-15T00:00:00" />  
  <Orders OrderID="10535" OrderDate="1997-05-13T00:00:00" />  
  <Orders OrderID="10573" OrderDate="1997-06-19T00:00:00" />  
  <Orders OrderID="10677" OrderDate="1997-09-22T00:00:00" />  
  <Orders OrderID="10682" OrderDate="1997-09-25T00:00:00" />  
  <Orders OrderID="10856" OrderDate="1998-01-28T00:00:00" />  
<Customers CustomerID="CHOPS" CompanyName="Chop-suey Chinese">  
  <Orders OrderID="10254" OrderDate="1996-07-11T00:00:00" />  
  <Orders OrderID="10370" OrderDate="1996-12-03T00:00:00" />  
  <Orders OrderID="10519" OrderDate="1997-04-28T00:00:00" />  
  <Orders OrderID="10731" OrderDate="1997-11-06T00:00:00" />  
  <Orders OrderID="10746" OrderDate="1997-11-19T00:00:00" />  
  <Orders OrderID="10966" OrderDate="1998-03-20T00:00:00" />  
  <Orders OrderID="11029" OrderDate="1998-04-16T00:00:00" />  
  <Orders OrderID="11041" OrderDate="1998-04-22T00:00:00" />  

 so what would be the technique to utilize this above result to fill the treeview?

but let me know if there is a better solution. 




learning.. : )
5/5/2009 4:22:04 AM 72751 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 24
Get it on Google Play
Get it on Apple App Store 

We All move to our original place.
Don't forget.

Imran Baloch
5/5/2009 5:17:17 AM

Similar Artilces:

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

Xslt required to transform the current xml to the specified xml format for the treeview control
hi , i am using the IE web controls treeview to populate a hierarchy.i an using this xslt <xsl:stylesheet xmlns:xsl="" version='1.0'>  <xsl:template match="/SOAP-ENV:Envelope">    <TREENODES>      <xsl:for-each select="a1:TreeNode">        <treenode>          <xsl:attribute name="Text">          </xsl:attribute>      ...

Microsoft Chart control for .NET Framework about state management and serialization problem, it works OK with one XML file but fails with another XML file
I use Microsoft Chart control for .NET Framework , you can see details at The Chart1 is load data from a xml and save to ViewStateData, so even if after I click Reload button, the chart1 still display OK! I'm very strange that the chart1 works well after click Reload button if it's loaded from Chart1.Serializer.Load(HttpContext.Current.Server.MapPath("~/Template/1.xml"));but chart1 don't display fter click Reload button if it's loaded from Chart1.Serializer.Loa...

Reading XML when no XML present for xmlnode...
Hello: I load an xml document to read, the documents vary in form and shape from each xml file to the next. I run the following: rootnode2.SelectSingleNode("//dt_array/item[@key='2']/dt_assoc/item[@key='name']") It returns the 'name' When I run the same statement but change the key='3' it throws an error since in the xml document there is not key='3'. But some documents will include the key='3' and some will not, how do I work around this? I tried the following which failed to work... If rootnode2.SelectSingleNode("//dt_array/item[@key='3']/dt_assoc/item...

In SQL Server 2000, is it possible to create an xml document in memory within a stored procedure (say, with FOR XML AUTO)? The resulting xml from such a call is not a string, so you can't use it as the input parameter for sp_xml_preparedocument. Any ideas?...

TreeView control and XML
I have an XML file that represents a number of controls on my WEB form. one of these controls is a Treeview. I am lookin for a method of extracting the TreeView XML nodes from the file and bind this back to the TreeView control.     <?xml version="1.0" ?> - <Query>   <StartDate>28/02/2006</StartDate>   <StartTime>00:00:00</StartTime>   <EndDate>02/03/2006</EndDate>   <EndTime>00:00:00</EndTime>   <FABID>TEST</FABID>   <ToolType>NSX</ToolType&...

TreeView control and XML
I have an XML file that represents a number of controls on my WEB form. one of these controls is a Treeview. I am lookin for a method of extracting the TreeView XML nodes from the file and bind this back to the TreeView control.     <?xml version="1.0" ?> - <Query>   <StartDate>28/02/2006</StartDate>   <StartTime>00:00:00</StartTime>   <EndDate>02/03/2006</EndDate>   <EndTime>00:00:00</EndTime>   <FABID>TEST</FABID>   <ToolType>NSX</ToolType&...

------_=_NextPart_001_01C6E0D0.3E27D77A Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi Craig and fellow VMS Perlers, You last wrote about this Fri 3/16/2001 11:24 AM, not counting your very helpful comments on Eisner/Decuserve more recently. One of my colleagues sent me an email requesting that I make XML::XSLT=20 available on VMS. perl 5.8.6, VMS 7.3-2, DECC 7.1 latest ACRTL (version 3) on Alpha XML::XSLT (version 0.48) depends on XML::Parser (version 2.34). This depends on expat (version 2.0.0). I built expat a...

Using extracted XML with XML-based controls
Hi I extract some data from a database and use "select" command with "For XML" in a SqlDataSource, so the data is in XML format. I have problem using these data with XML-based controls like TreeView control. How can I use this type of XML with XML-based controls. Regards Hi, You can follow those steps: 1. Use the ExecuteXmlReader method of the System.Data.SqlClient.SqlCommand class to load the results of SQL Extensible Markup Language (XML) queries from Microsoft SQL Server into a System.Xml.XmlReader object.

write xml file using xml control
Hi Guys, Environment: 2.0   I am trying to create a xml file using xml control at rumtime. I have a asp:xml control with DocumentSource property set to xml file myFile.xml. myFile.xml: <myRoot>          <EMPLOYEE>               <FNAME></FNAME>               <LNAME></LNAME>         &nbs...

XSLT to transform XML into XML in VB.NET
Hello. I need some help with XSLT. We have an XML coming in and I need to transform this XML to a format that we use using XSLT so that future changes in the incoming file are easy to change in the XSLT rather than changing the VB code.This is the sample input file  <MemberReports xsi:schemaLocation="http://developreports/myreport/v1/report.xsd"> <DateCreated>2006-04-15</DateCreated> <MemberReport> <MemberOrganization>MemberOrganization</ReportingOrganization> <Member> <Name> ...

Transform XML to XML
I've been trying to transform an XML document to another XML document. The original document is very large (6megs) and the application that needs to use it only needs a fraction of the data. I'm trying to take this mother-of-all XML documents and filter out unwanted nodes. I could probably do this very easily with code by running a few XPath Queries against the document, and placing the results in a new document...however...I have an interest in learning how to do this with XSL. In the past, I've done some pretty basic XML to HTML transformation ans that worked out well. This ti...

Create grid view from xml with all the controls specified in the xml
Hi,         I have to create a grid view dynamically from the xml with the controls mentioned in the xml. how can i do it?   Thanks Pulikkan     Check this link  Click "Mark as Answer" on the post that helped you. This will help readers to know which post solved your issue...

Web resources about - treeview, and xml. for xml auto option of tsql -

Live-Beta TreeView Demo: Frameless Layout with Highlighting TreeView Demo: Frameless Layout with Highlighting ...
Welcome to our beta site for CBC Live mp3 streams! This is a form of online broadcast we are exploring right now, both from a technical best-practices ...

Visual Basic for Applications - Wikipedia, the free encyclopedia
Visual Basic for Applications ( VBA ) is an implementation of Microsoft 's event-driven programming language Visual Basic 6 and its associated ...

From the Saint
It's full steam ahead for events in the Saint today; although some have been postponed, others are getting bigger and better.

HOME - St. Catharines
St. Catharines is a city that offers many ammenities and opportunities to its residents. It is a place known for its friendliness, charm and ...

CrossFont Help
CrossFont Help

Examples - AlloyUI
AlloyUI is a framework built on top of YUI3 that provides a simple API for building high scalable applications. — all software.
Xara X1 1.1 DL Xara X is an advanced graphic illustration package for Windows, that offers unrivaled redraw speed and a user interface which ...

CrossFont Help
CrossFont Help

Evolution of the Windows Interface
... a 3D button, comboboxes. Windows 95 introduced a slew of new 3D controls, such as rich text edit, toolbars/statusbar, progressbar, treeview/listview, ...

Silverlight - Blackboard
Silverlight is a development platform for creating rich media applications and business applications for the Web, desktop, and mobile devices.Microsoft ...

Resources last updated: 12/9/2015 6:00:11 AM