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

RadGridView and Asynchronous load

3 Answers 309 Views
GridView
This is a migrated thread and some comments may be shown as answers.
danijels
Top achievements
Rank 1
danijels asked on 27 May 2010, 11:02 AM
I can't get this to work. I have a RadGridView with following properties set:
<telerik:RadGridView x:Name="answers" ShowGroupPanel="False" AllowDrop="False" CanUserReorderColumns="False" CanUserSortColumns="False" DataLoadMode="Asynchronous" AutoGenerateColumns="True" ScrollMode="Deferred" EnableRowVirtualization="True" SelectionMode="Extended" /> 
 In code behind, the DataContext and ItemsSource are set to a new ObservableCollection<object>() which is populated when the data is retrieved from a WCF service. The Data object is populated in the callback function of the asyncronous call to the service like this:
ServiceResult.AnswerList.ToList().ForEach(Data.Add); 
 
Now, the grid displays the data, that is not an issue. The problem is that the DataLoadMode="Asynchronous" EnableRowVirtualization="True" bit does not seem to kick in. The browser hangs with large amounts of data going over the wire and I'm not sure if there is anything in particular I should do in the data contracts or otherwise to get this to load asynchronously.

Any help would be greatly appreciated.
Thank you

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 May 2010, 11:45 AM
Hi,

I'm not sure about your scenario and what is desired result however you can safely remove DataLoadMode="Asynchronous" since your service is asynchronous itself. The grid will get chunk of data only if you use paging - DataLoadMode="Asynchronous" is not related to this.

All the best,
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.
0
danijels
Top achievements
Rank 1
answered on 27 May 2010, 11:50 AM
Thanks, Vlad

So, is there no possibility to get chunks of data using a service and only fetching a little more than it is visible in the grid? I'm thinking maybe OnRowLoading or something similar invoking new calls to the service and providing the range of data to fetch?

0
Vlad
Telerik team
answered on 27 May 2010, 11:53 AM
Hi,

If you want to do this on scroll please check my blog post for more info:
http://blogs.telerik.com/vladimirenchev/posts/09-12-21/how_to_custom_scrolling_with_radgridview_for_silverlight_and_wcf_ria_services.aspx

All the best,
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
danijels
Top achievements
Rank 1
Answers by
Vlad
Telerik team
danijels
Top achievements
Rank 1
Share this question
or