Results 1 to 2 of 2

Thread: [RESOLVED] writexml dropping last item

  1. #1

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Resolved [RESOLVED] writexml dropping last item

    i am trying to use this code to write the contents of a DGV to a file but it is leaving out the last coloumn of data when it writes the xml file.

    vb.net Code:
    1. Dim ds As DataSet = CType(DataGridView2.DataSource, DataSet)
    2.                 ds.WriteXml(SaveFileDialog1.FileName & ".xml")


  2. #2

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: writexml dropping last item

    i got it to work by removing focus from the DGV before writing the contents to the xml file

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