473,508 Members | 2,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

displaying xml data in treeview &particular node attributes in Datagrid

2 New Member
I'm new to xml ..

I had created a application such a way that I have to display the xml file in treeview control in C#.Net Application ...

If I select the particular Node it should display the attributes of that node in DataGrid

But I am displaying the attributes in dataGrid if i use the following Code
XmlNode x = root.SelectSingleNode("//JDF")


If i am using nodeset in xml for searching the specified node
XmlNode x = root.SelectSingleNode("//LocalName'"+tree.SelectedNode.Fullpath+"'")

An unhandled exception has occured in your application .
localname'JDf\customerinfo\company\contact\comchan nel' has an invalid token.



If I am using Without Nodeset
XmlNode x = root.SelectSingleNode("//'"+tree.SelectedNode.Fullpath+"'")

An unhandled exception has occured in your application .
The Expression passed to this method should result in a NodeSet..





But the problem is I have to display the Attributes of a particular node in DataGrid based on TreeView_AfterSelect event................
---------------------------------------------------------------------------------
XmlNode x = root.SelectSingleNode("//LocalName'"+tree.SelectedNode.Fullpath+"'")

--------------------------OR----------------------------------------------------
XmlNode x = root.SelectSingleNode("//'"+tree.SelectedNode.Fullpath+"'")
----------------------------OR-----------------------------------------------------


I need altenate code for above mentioned line .....


Please
Oct 25 '06 #1
0 2168

Sign in to post your reply or Sign up for a free account.

Similar topics

1
10138
by: Dmitry Karneyev | last post by:
Hi! How to add tooltip to a TreeView node? Thanks for any advice! Dmitry.
1
10736
by: JustinG | last post by:
I am relativley new to C#, and I am trying to write code using the compact framework, that will allow a handheld user to hit enter while a treeview node is selected, which will then do something...
0
1652
by: Devhead | last post by:
I changed the treeview node text to bold and changed color "successfully". However, the node text was truncated and when i did a tree refresh the node formatting was gone. What do i need to do to...
4
4601
by: Yavuz Bogazci | last post by:
Hi, i have created a treeview and this works nice. I have now a problem: I want to store 2 more Information to each Treeview Node like UserID and CompanyID. How can i do that? Thanks Yavuz...
8
14242
by: Don Wash | last post by:
Hi There! I'm using VB.NET to create a TreeView application and unfortunately I could not find "Key" property in Node items of the TreeView. We used to have "Key" property in TreeView node...
2
7417
by: Christian Rühl | last post by:
heyho, guys! here's another question for you now: i built an iterator to get all the nodes with a certain attribute in an xml dom. it all looks like this (i'm using .NET framework 1.1) ...
3
21839
by: Michael_Burgess | last post by:
Hi there, I've looked around the different groups and still can't figure this out without resorting to scrappy code............ I want to programtically select and highlight a TreeView node,...
2
2130
by: james_027 | last post by:
hi everyone, I am now in chapter 5 of Dive Into Python and I have some question about it. From what I understand in the book is you define class attributes & data attributes like this in python...
1
5071
by: R.A.F. | last post by:
Hi, I would like simulate a mouse click on on of my treeview nodes when my form opens. for that i was thinking to use the same simple way as under C++ : SendMessage(TreeView.Nodes.Handle,...
0
960
by: Zuhaib Hyder | last post by:
TreeView node selection not working with PopulateOnDemand, any idea?? i want to select each node on click... even when any file opens in right frame in response of click on Treeview node on left...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.