New Posts New Posts RSS Feed: Repository or viewmodel with paged view
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Repository or viewmodel with paged view

 Post Reply Post Reply
Author
alindzon View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2010
Location: Toronto
Posts: 31
Post Options Post Options   Quote alindzon Quote  Post ReplyReply Direct Link To This Post Topic: Repository or viewmodel with paged view
    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.
 
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2010 at 12:17pm
Hi alindzon;

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


Edited by DenisK - 04-Oct-2010 at 3:41pm
Back to Top
paul View Drop Down
Newbie
Newbie


Joined: 16-Sep-2010
Posts: 19
Post Options Post Options   Quote paul Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
alindzon View Drop Down
Newbie
Newbie
Avatar

Joined: 28-Jul-2010
Location: Toronto
Posts: 31
Post Options Post Options   Quote alindzon Quote  Post ReplyReply Direct Link To This Post 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.
 
It should be easy to use this as a target for the data.
 
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 19-Oct-2010 at 4:58pm
Hi Paul;

I was informed that it is not ready yet.
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Posted: 25-Oct-2010 at 11:58am
Will your presentation be made available online, Ward? 
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down