如何创建可以读取其中包含多个节点的XML文件的datagridview [英] How to create datagridview that can read XML file which has multiple nodes in it

查看:77
本文介绍了如何创建可以读取其中包含多个节点的XML文件的datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先感谢您的阅读..!



现在来查询:我在一个网格中有两个网格,我有数据必须是保存在xml文件和另一个网格中,它显示了存储在xml文件中的数据和子节点的数据,你可以建议我如何将数据添加到带有子节点的xml文件中,并检索带有子节点的第二个网格中的数据用一个小对话框。

邮件ID:[EMAIL REMOVED]



在这回复我...



我尝试了什么:



太冗长的代码我不能在这里发布

解决方案

我们只能猜测,因为您没有提供XML数据外观的示例。

也许这会让您入门: c# - WinForms,DataGridView:使用多个属性过滤XML数据节点 - 堆栈溢出 [ ^ ]



以下是一些不错的例子带有示例的LINQ to XML教程| DotNetCurry [ ^

hi first of all thanks for reading..!

now coming to query : i have two grids in windowsforms in one grid i have data which has to be saved in xml file and in another grid it has show the data which was stored in xml file and data from child nodes can you suggest me how to add the data to xml file with child nodes and retrieve the data in the 2nd grid with child nodes with a small dialog box.
mail id:[EMAIL REMOVED]

reply me in this...

What I have tried:

too much lengthy code i cant post it here

解决方案

We can only guess as you do not have provided an example of how your XML data looks.
Maybe this will get you started:
c# - WinForms, DataGridView: Filtering XML data using attributes from multiple nodes - Stack Overflow[^]

Here are some nice examples LINQ To XML Tutorials with Examples | DotNetCurry[^]


这篇关于如何创建可以读取其中包含多个节点的XML文件的datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆