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

Demo information

3 Answers 153 Views
Data Virtualization
This is a migrated thread and some comments may be shown as answers.
Waleed Seada
Top achievements
Rank 2
Waleed Seada asked on 06 Feb 2011, 05:55 PM
Dear All,
I was looking into the new Virtualization demo specificaly at this url: http://localhost:6519/Default.aspx#DataVirtualization/FirstLook
I can't resolve the DataContext = new ExamplesDataContext(); where does ExamplesDataContext() can from !!

How about the implementation of MVVM using Virtualization. a sample will be great ...

By the way; great break through from telerik (as usuall)
Best regards
Waleed

3 Answers, 1 is accepted

Sort by
0
Waleed Seada
Top achievements
Rank 2
answered on 06 Feb 2011, 09:06 PM
0
John
Top achievements
Rank 1
answered on 17 Apr 2011, 03:55 AM
Greetings,
I followed your link and got the demo.  Looking through it, it is using DomainService to obtain the data.  On the other hand, I am using WCF to obtain the data.  Hence, when reading this block of code, I truly have no clue how it works.

using System.Linq;
using System.Windows.Controls;
using Telerik.Windows.Data;
using SilverlightApplication1.Web;
using System.ServiceModel.DomainServices.Client;
 
namespace SilverlightApplication1
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
 
            var context = new NorthwindDomainContext();
            var query = context.GetOrder_DetailsQuery().OrderBy(o => o.OrderID);
            query.IncludeTotalCount = true;
 
            var view = new VirtualQueryableCollectionView() { LoadSize = 10, VirtualItemCount = 100 };
            view.ItemsLoading += (s, e) =>
            {
                context.Load<Order_Detail>(query.Skip(e.StartIndex).Take(e.ItemCount)).Completed += (sender, args) =>
               {
                   var lo = (LoadOperation)sender;
                   if (lo.TotalEntityCount != -1 && lo.TotalEntityCount != view.VirtualItemCount)
                   {
                       view.VirtualItemCount = lo.TotalEntityCount;
                   }
 
                   view.Load(e.StartIndex, lo.Entities);
               };
            };
 
            DataContext = view;
        }
    }
}

Is there any sample codes for WCF that would do the similar action?  

Any help is extremely helpful.
Thanks

0
Vlad
Telerik team
answered on 18 Apr 2011, 06:15 AM
Hello John,

 Last week I've made small demo on how to this with plain web service. You need to pass some info to your service method similar to the attached project.

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
Data Virtualization
Asked by
Waleed Seada
Top achievements
Rank 2
Answers by
Waleed Seada
Top achievements
Rank 2
John
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or