Hi all,

I'm making an application that reads RSS Feeds from several sites. Now I want it to put it in a ListView but I can't put it in the different columns.
All the data goes to the first column and I don't want that, I want it to also put it in other columns

My code :

Dim xdoc As XDocument = XDocument.Load("url")

            Dim query = From rssFeed In xdoc.Descendants("item") _
                        Select Title = rssFeed.Element("title").Value, _
                           Description = rssFeed.Element("description").Value, _
                           Link = rssFeed.Element("link").Value
            For Each item In query

                ListView1.Items.Add("TITLE: " + item.Title)
                ListView1.Items.Add("DESCRIPTION: " + item.Description)
                ListView1.Items.Add("LINK: " + item.Link)
            Next
        End If

Thanks,

Vhyr

Assuming that you already have three columns in the listview.
Here's how you can do that.

Dim xdoc As XDocument = XDocument.Load("url")

Dim query = From rssFeed In xdoc.Descendants("item") _
Select Title = rssFeed.Element("title").Value, _
Description = rssFeed.Element("description").Value, _
Link = rssFeed.Element("link").Value

For Each item In query
   Dim item As New ListViewItem("TITLE: " & item.Title)
   item.SubItems.Add("DESCRIPTION: " + item.Description)
   item.SubItems.Add("LINK: " + item.Link)
   ListView1.Items.Add(item)
Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.