This is a migrated thread and some comments may be shown as answers.

Load data asynchronously using an XMLDataProvider

1 Answer 129 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Norbert John
Top achievements
Rank 1
Norbert John asked on 27 Aug 2010, 03:47 PM
Hello,

How can I load the data asynchronously using an XMLDataProvider. Following is the code I tried. I have set IsAsynchronous to true. But financialInfoProvider.Data is returning Nothing in the below code snippet.
Dim financialInfoProvider As New XmlDataProvider()
Dim finacialInfoXMLPath As String = String.Empty
finacialInfoXMLPath = BuildFinancialInfoXML()
financialInfoProvider.IsAsynchronous = True
financialInfoProvider.Source = New Uri(finacialInfoXMLPath, UriKind.RelativeOrAbsolute)
financialInfoProvider.XPath = "/RemainingFinancialInfo/Property"
m_GridDataSource = New ObservableCollection(Of XmlNode)(DirectCast(financialInfoProvider.Data, IEnumerable(Of XmlNode)))

Thanks and Regards,
Norbert John

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Aug 2010, 07:45 AM
Hello,

 Since the provider is asynchronous you cannot expect that .Data will be available immediately. Why not bind the grid ItemsSource directly in XAML instead to the Data property of your provider? 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Norbert John
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or