Click here to Skip to main content
15,790,917 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am using windows application (VB.Net).

I have a datagridview control with XML data source.

I need to update my datagridview rows when any update/change made to XML file.

Updated 4-Jul-11 22:04pm
Dalek Dave 5-Jul-11 3:04am    
Edited for Readability.

Well, how do you know the XML was changed ? Where is it ? If it's changed, then you can rebind to it. If it's a file on the hard drive, you can use a file watcher to get a report when the file is changed, and reload it.[^]
Share this answer
kals84 5-Jul-11 3:25am    
can't we use .update() or .refresh() method to update rows ??
Dave Kreskowiak 5-Jul-11 16:47pm    
No. You have to reload the XML file entirely. XML is not a database, so it doesn't support retrieving just the "changed" rows.
Yes. Dave you are right we need to relod the xml file,
Do one thing open that xml file in notepad and make changes whatever you want and save it as same file name(Dont forget to put the extension .xml once again) in same drive after that system will aking for replacing the file click yes after run your application, it will work.

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