tags:

views:

47

answers:

0

Hello, I have a XML String which is Valid XML. I want to bind it to a GridView. But when I try the code below it is throwing Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource error. Please help

 Dim sr As New StringReader(statusstring)
        Dim violations As XDocument = XDocument.Load(sr)

        GridView1.DataSource = violations.Document
        GridView1.DataBind()