1 Replies - 108 Views - Last Post: 14 May 2019 - 02:35 PM Rate Topic: -----

#1 Trif Alin   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 14-May 19

listview items load from .xml file automatically

Posted 14 May 2019 - 02:30 PM

hello everyone, I'm newbie in programming so please don't judge me.
I need a little help :
how can load automatically a data from a XML file which contains a few columns in my program when is start.
I figured out something but don't want to work ,I put the code below

Private Sub LoadDataFilesFromFILE()


            Dim Applist As String = Application.StartupPath & "\datasfile..xml"
            Dim AppReader As New StreamReader(Applist)

            Do While AppReader.Peek <> -1

                Dim xDoc As XElement = XElement.Load(Applist)

                For Each item As XElement In xDoc...<Item>
                    PopulateListView(item...<Line>.Value, item...<Name>.Value, item...<UName>.Value, item...<PswName>.Value, item...<webName>.Value, item...<linkName>.Value, item...<noteName>.Value)


        Catch ex As Exception
            MsgBox("Error in loading file...sorry...", MsgBoxStyle.Exclamation)

        End Try

End sub


Is This A Good Question/Topic? 0
  • +

Replies To: listview items load from .xml file automatically

#2 modi123_1   User is offline

  • Suitor #2
  • member icon

Reputation: 14994
  • View blog
  • Posts: 59,870
  • Joined: 12-June 08

Re: listview items load from .xml file automatically

Posted 14 May 2019 - 02:35 PM

You would look over the list of events for the form and find which one sounds the best to suit your needs.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1