xaml:
<RadGrid:RadGridView x:Name="GrdList" AutoGenerateColumns="True" MaxHeight="600" MinWidth="650" BorderThickness="2" ></RadGrid:RadGridView>
code behind:
Public Sub New()
InitializeComponent()
GrdList.ItemsSource = GetXmlData()
End Sub
Private Shared Function GetXmlData() As Object
Dim doc As New XmlDocument()
doc.LoadXml("<?...")
Dim provider As New XmlDataProvider()
provider.IsAsynchronous = False
provider.Document = doc
provider.XPath = "Products/Product"
Return New ObservableCollection(Of XmlNode)(DirectCast(provider.Data, IEnumerable(Of XmlNode)))
End Function
throws exception: 'System.Func`2[System.Xml.XmlNode,System.String]' cannot be converted to type 'System.Func`2[System.Xml.XmlElement,System.String]'.
I am using dotnet framework 3.5 and version of rad dll is 2010.3.1314.35.
<RadGrid:RadGridView x:Name="GrdList" AutoGenerateColumns="True" MaxHeight="600" MinWidth="650" BorderThickness="2" ></RadGrid:RadGridView>
code behind:
Public Sub New()
InitializeComponent()
GrdList.ItemsSource = GetXmlData()
End Sub
Private Shared Function GetXmlData() As Object
Dim doc As New XmlDocument()
doc.LoadXml("<?...")
Dim provider As New XmlDataProvider()
provider.IsAsynchronous = False
provider.Document = doc
provider.XPath = "Products/Product"
Return New ObservableCollection(Of XmlNode)(DirectCast(provider.Data, IEnumerable(Of XmlNode)))
End Function
throws exception: 'System.Func`2[System.Xml.XmlNode,System.String]' cannot be converted to type 'System.Func`2[System.Xml.XmlElement,System.String]'.
I am using dotnet framework 3.5 and version of rad dll is 2010.3.1314.35.