Re: How to fomat table columns as attributes rather than elements



Moondaddy,

As Kevin wrote is working with a Treeview different than using a complex
data control as the DataGrid or DataGridView.

To get almost the same with elements as using attributes in a DataSet is
using the "Nested" property from the dataset.

http://msdn2.microsoft.com/en-us/library/7sfkwf9s.aspx

I hope this helps,

Cor


"moondaddy" <moondaddy@xxxxxxxxxxxxxxx> schreef in bericht
news:ua$488suGHA.1372@xxxxxxxxxxxxxxxxxxxxxxx
Yes, all the code examples I see for working with treeview controls in
asp.net use xml with attributes. I'm having trouble learning how to use
the code in these various examples when the dataset is much different from
the example's xml.

In particular, I'm working with a table which has a recursive
relationship. when I create a dataset and add the recursive relationship
to it, fill it with data from the db, and look at the xml via ds.getxml or
writing it to a file, it has the nested hierarchy that I would expect. So
far so good. however, I cant get it to work using the code examples that
use attributes.

I tried using For XML but that's a real pain for recursive relationships
where you don't know the depth of the tree.

any good recommendations?

also, if I use For XML then I cant use the benefits of working with the
dataset since the dataset doesn't like attributes.

uuhg!



--
moondaddy@xxxxxxxxxxxxxxx
"Kevin Yu [MSFT]" <v-kevy@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:MWzKmKsuGHA.6004@xxxxxxxxxxxxxxxxxxxxxxxx
Hi moondaddy,

I don't recommend you change a column into attributes. Because this is
not
corresponding to the DataSet schema. And you might fail to get data from
it, because ReadXml or ReadXmlSchema will not acknowledge attributes as
columns.

Is there any particular reason that you need to change this?

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)





.



Relevant Pages

  • Re: Word Searching XML
    ... which will be somewhat interactive and can not expected to load ... we are trying to search XML node and its ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: SQL2005, validation, & XQuery
    ... The xml in my sample columns only *had* one node: ... with the query I thought it might be related to the default namespace so I ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.xml)
  • RE: DataGrid Shift-Space problem -- official workaround?
    ... Shift+Space is identified as DataGrid navigation key-combination. ... code snippet that processes this key-combination: ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: How to fomat table columns as attributes rather than elements
    ... data control as the DataGrid or DataGridView. ... asp.net use xml with attributes. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: XmlDataSource & Website Proxy
    ... As for the XmlDataSource control, it doesn't expose a property for us to ... string based Xml content mostly. ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)

Loading