Results 1 to 4 of 4

Thread: [2005]Datagridview to xml

  1. #1

    Thread Starter
    Fanatic Member vijy's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    548

    [2005]Datagridview to xml

    I want to export the datagridview into XML,

    Is any open source for it.
    Visual Studio.net 2010
    If this post is useful, rate it


  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005]Datagridview to xml

    How are you populating the grid? If it's bound to a DataTable then you can use its WriteXml method. Otherwise you would write it the way you would any other XML: with an XmlWriter. You should read up about that class for a start. You can then loop through the rows of the grid and write an element for each row.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member vijy's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    548

    Re: [2005]Datagridview to xml

    Yes i cant able to use the writeXml method..

    Am looping through Rows and columns it taking much more time..

    @ John., "You should read up about that class for a start." What does this mean?
    Visual Studio.net 2010
    If this post is useful, rate it


  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005]Datagridview to xml

    Quote Originally Posted by vijy
    @ John., "You should read up about that class for a start." What does this mean?
    It means you should go to the MSDN Library and read the documentation for the XmlWriter class. If you feel you need more information after that I'd suggest searching the Web for tutorials and examples of its use.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width