开发者

Dynamic forms with MVVM, DomainCollectionView, etc

Greetings.

I'm using an Entity Data Model with a LinqToEntities DomainService. In my ViewModel, I'm using the new SP1 DomainCollectionView to Bind my datagrid i开发者_开发问答temssource. Currently, that looks like this:

this._source = new EntityList<P_BUDGET>(this._context.P_BUDGETs);
this._loader = new DomainCollectionViewLoader<P_BUDGET>(
             this.LoadSampleEntities,
             this.OnLoadSampleEntitiesCompleted);
this._view = new DomainCollectionView<P_BUDGET>(this._loader, this._source);

I then have a property, called CollectionView, bound to the ItemsSource of my grid. The Prop looks like this: public ICollectionView CollectionView { get { return this._view; }} My ideal endgame would be to have a left menu with a list of 15 different items. Each item would correspond to an entity in my Data Model (e.g. Budgets). When a user clicked on Budgets, I'd resolve that to the entity P_BUDGET, and pass it through to a service that called my data, returned my _view, which would bind my gridview. If a user clicked on "Accounts", it would return the P_ACCOUNTS data, etc etc. Essentially, dynamic maintenance pages.

I've googled the hell outta this, and I'm simply not sure what i should be searching for. I'm new to most of this!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜