DataGridView in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • usyra42
    New Member
    • Mar 2007
    • 8

    DataGridView in C#

    We have Created DataGridView from a XML.
    Now whenever we update the values in the cells of DataGrid View it should reflect the XML also.
    Can u pls help in this...
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Have you tried ado.net from the update event?
    Accessing and Updating Data in ASP.NET 2.0: Retrieving XML Data with XmlDataSource Control

    Comment

    • usyra42
      New Member
      • Mar 2007
      • 8

      #3
      Originally posted by kenobewan
      no idea of asp.net i am just learning C# and doing the project

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        DataGridView might have a method to do this itself, but
        It you can get the DataTable that corrosponds to the DataGridView, you can say .WriteXML(filen ame) and have it write it all out for you.

        Comment

        • usyra42
          New Member
          • Mar 2007
          • 8

          #5
          Originally posted by Plater
          DataGridView might have a method to do this itself, but
          It you can get the DataTable that corrosponds to the DataGridView, you can say .WriteXML(filen ame) and have it write it all out for you.

          i have done the same thing but it not reflecting the changes in XML.

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            If the changes in the DataGridView have not been "accepted", then the xml will not show any changes.

            Also be sure your filename is pointing to the correct place, say with an absolute path and not with a relative path.

            Comment

            Working...