Print Page | Close Window

Repository or viewmodel with paged view

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2209
Printed Date: 14-Oct-2025 at 10:12pm


Topic: Repository or viewmodel with paged view
Posted By: alindzon
Subject: Repository or viewmodel with paged view
Date Posted: 02-Oct-2010 at 8:18pm
I am trying to integrate your different examples into a clean test case, and I am just getting lost.  What I am trying to do is a simple MVVM Light application with a Repository that can properly support both single record and paged radgrid views.
 
I am afraid without an example to look at, I am not going to be able to even get started.
 
I tried to lift the code form your example of a paged view, and put it into the viewmodel, and got stuck on the DataContext which does not exist in the current context.
 
I eliminated the problem of referencing the _dataPager.PageSize from the view in the viewmodel, by using a public variable in the viewmodel instead, that the view can bind to.
 
But I have no idea what to do instead of DataContext, or how to get it to work if it should be in the viewmodel.

I also think most of this code should really be in the repository, but that is confusing me even more.
 
So please someone show me an example of either a viewmodel that supports paged data access with caching, or a repository linked to a viewmodel and view to do the same.
 
Thanks.
 



Replies:
Posted By: DenisK
Date Posted: 04-Oct-2010 at 12:17pm
Hi alindzon;

We're currently putting an example using MVVM Light and Caliburn.Micro


Posted By: paul
Date Posted: 19-Oct-2010 at 10:22am
Originally posted by DenisK

Hi alindzon;

We're currently putting an example using MVVM Light and Caliburn.Micro

Is it possible to get a sneak peek at the repository and viewmodel code. I have plenty of examples of RIA and EF4 but I would like to see a specific DevForce implementation.




Posted By: alindzon
Date Posted: 19-Oct-2010 at 10:28am
Consider including some UI in your example.  You guys recommended Telerik to me, and it appears to be a good fit.  Check out how well it can integrate with devforce.  They came up with some nice tight paged and filtered integration here.
http://www.telerik.com/community/forums/silverlight/gridview/integration-with-devforce-working-but-not-optimal.aspx - http://www.telerik.com/community/forums/silverlight/gridview/integration-with-devforce-working-but-not-optimal.aspx
 
It should be easy to use this as a target for the data.
 


Posted By: DenisK
Date Posted: 19-Oct-2010 at 4:58pm
Hi Paul;

I was informed that it is not ready yet.


Posted By: WardBell
Date Posted: 19-Oct-2010 at 10:33pm
Demo-ing some of this kind of code at Patterns and Practices this week. Only a matter of time before we show it in the Cookbook.


Posted By: smi-mark
Date Posted: 25-Oct-2010 at 11:58am
Will your presentation be made available online, Ward? 


Posted By: WardBell
Date Posted: 25-Oct-2010 at 4:19pm
I understand that PnP recorded my presentation. I gave permission to publish ... gosh I hope that was a good idea as I made some jokes that I may regret :->
 
Meanwhile, I'm punching the code sample to our web site "very soon", most likely in the Cookbook



Print Page | Close Window