如何从AspxGridview删除行,在该行中xml充满了来自xml文件的数据? [英] How to delete rows from AspxGridview where grid is filled with data from xml files.?

查看:89
本文介绍了如何从AspxGridview删除行,在该行中xml充满了来自xml文件的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

我已经使用xml文件填充了Gridview.现在,我想从Gridview中删除行,这也可以使用CLEAR Button删除xml文件中的数据....是否可以删除xml?如果可以,怎么办?


请尽快回复,

谢谢与问候,
Ramu ..

解决方案

.是否可以删除xml?
是的

从Gridview中删除行,这也会删除xml文件中的数据
您需要做的就是修改XML.

网上有很多关于如何处理XML的文章-从XML添加/编辑/删除数据.如果需要,请选择任何一个并在您的应用程序中实现.
这样的几个:
使用XPath和XmlDocument(C#)操作XML数据 [ ^ ]
使用C#操纵XML文件 [ ^ ]

一篇不错的文章: .NET中的XML:.NET Framework XML类和C#提供了简单,可扩展的数据操作 [ ^ ]

使用XMLDataSource绑定到DevExpress ASPxGridView.但是,请记住:

XmlDataSource控件通常用于数据绑定控件显示XML数据的只读数据方案中.但是,您也可以使用XmlDataSource编辑XML数据.请注意,与其他数据源控件一起使用的自动更新,插入和删除操作将不起作用. 您必须编写自定义代码才能使用XmlDataSource控件修改数据.

http://msdn.microsoft.com/en-us/library/494y92bs.aspx [ ^ ]


Hi Friends,

I''ve filled a Gridview using xml files..Now I want to delete rows from Gridview which also deletes data in xml files using CLEAR Button....is it possible to delete xml? if so, how?


Plz reply ASAP,

Thanks & Regards,
Ramu..

解决方案

.is it possible to delete xml?
Yes

delete rows from Gridview which also deletes data in xml files
All you need is to modify your XML.

There are various articles on web on how to manipulate XML - Add/Edit/Delete data from XML. If needed, pick any and implement the same in your application.
Couple of such:
Manipulate XML data with XPath and XmlDocument (C#)[^]
Manipulating XML file with C#[^]

Nice article this one: XML in .NET: .NET Framework XML Classes and C# Offer Simple, Scalable Data Manipulation[^]


Use an XMLDataSource to bind to the DevExpress ASPxGridView. However, keep in mind:

The XmlDataSource control is commonly used in read-only data scenarios where a data-bound control displays XML data. However, you can also use the XmlDataSource to edit XML data. Note that automatic update, insert, and delete operations that work with other data source controls will not work. You must write custom code to modify data using the XmlDataSource control.

http://msdn.microsoft.com/en-us/library/494y92bs.aspx[^]


这篇关于如何从AspxGridview删除行,在该行中xml充满了来自xml文件的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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