本文介绍了打开特定位置的xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我知道,我是C#和编程的新手,这个论坛对我来说非常有用。我不时学到新东西,而且我一直在创造一个新的程序,只是为了娱乐和学习。我的程序从客户那里获取信息并使用gridView创建
表,并显示路由器和swicth如何连接的配置,但是如果我允许保存在xml中并且读取它会是灰色的。我做了,我找到了使用数据集和数据表功能的方法,但是当我保存或加载时,我不用
knwo如何选择一个指定的位置。    

I know, I am new in C# and programming and this forum has been really useful for me. From time to time I learn something new and I have have been creating a new program just for fun and learning. My program takes the info from the customer and it creates a table using gridView and shows the configuration how the routers and swicth are connected but I though that it would be gray if I allow to save in xml and read. I did and I found the way using dataset and datatable function but when I save or load I don't knwo how to select a specif location.    

为了写作,我使用了   ds.WriteXml(" f:\\Data1.xml");我猜有没有选项打开一个窗口,允许选择路径,不是吗?

For writing, I used  ds.WriteXml("f:\\Data1.xml"); and my guess there is n option to open a windows ans allow select the path, isn't it?

用于加载,我用过   ds.ReadXml(" F:\\ \\\Data.xml");同样的事情

for loading, I used  ds.ReadXml("F:\\Data.xml"); same thing

你能帮我解决这两个选择吗?

Could you please help me with these two options?

谢谢

Jose

推荐答案

当你可以看到,我使用数据集,我从datagridview1加载信息

as you can see, I used dataset and I load the information from datagridview1

限制是路径是固定的。有没有选择像OpenFileDialog一样使用它?

the limitation is the path is fixed. Is there any option to use it like OpenFileDialog?


这篇关于打开特定位置的xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 22:13