Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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..
Posted
Updated 10-Jul-12 0:20am
v2
Comments
Shemeer NS 10-Jul-12 6:27am    
CLEAR button is in the same row? or outside? do you have any unique key in xml file?

.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[^]
 
Share this answer
 
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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900