Print Page | Close Window

How do I add a VM property?

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=3195
Printed Date: 02-Apr-2025 at 6:18am


Topic: How do I add a VM property?
Posted By: pponzano
Subject: How do I add a VM property?
Date Posted: 09-Jan-2012 at 1:09am
Hello,
I've a complex type mapped from a store, I need to have an IsItemBusy property for my View purpose (need to set @ true a busyindicator) how can I achieve this?

the only thing that came to my mind was creating an object that has all the properties of the one returned from DB plus this other one...

Thanks



Replies:
Posted By: DenisK
Date Posted: 09-Jan-2012 at 6:31pm
Hi Paolo,

If you've mapped your ComplexType in your model, then DevForce should have generated its class as well. You don't need to create the class manually. Your complex type class will inherit from IdeaBlade.EntityModel.ComplexObject.

Since DevForce generates the class partially, you can define the IsItemBusy property inside your own partial class and expose it to your View.

You can read the following write-up for further info.  http://drc.ideablade.com/xwiki/bin/view/Documentation/model-complextype - http://drc.ideablade.com/xwiki/bin/view/Documentation/model-complextype


Posted By: pponzano
Date Posted: 10-Jan-2012 at 5:48am
Perfect! Thanks a lot, you saved me from writing a shave-of-code with the ResultComplexObject as a parameter for my viewmodel!
Thanks



Print Page | Close Window