New Posts New Posts RSS Feed: Nested Properties in ASP.NET GridView or DetailsView
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Nested Properties in ASP.NET GridView or DetailsView

 Post Reply Post Reply
Author
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Topic: Nested Properties in ASP.NET GridView or DetailsView
    Posted: 06-Jun-2008 at 3:43pm
Is there a way to get nested properties to work in the GridView and DetailsView BoundField object's (like Contact.Address.FullAddressHTML).  In the previous framework we converting from, all of our entities inherited from a base class that inherited from an object that implemented the ICustomTypeDescriptor interface which returned a custom "PropertyDescriptorCollection" class on the GetProperties method of ICustomTypeDescriptor which enabled us to use Nested Types.

In the help files I see some reference to nested properties and databinding but I'm not sure if or how they can be used in an ASP.NET application.

Also, the ADO.NET EF framework doesn't easily allow one to define a custom base class which all other entities inherit from which common custom code could be put.  I don't see a way to do this in the current beta of DevForce EF, will there be a way in the next beta?  If I could do this, then I would just make this abstract base class implement the ICustomTypeDescriptor class like we current have but without this, I would have to do this on all my entities and I really don't want to have to do that.

Thanks,

Dan
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2008 at 10:39am
In DevForce EF Beta2 we've added support for "injected" types - custom classes you can inject into your model to supply common code and behaviors.   So you just have to wait a few more days ...
Back to Top
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2008 at 10:44am
That makes me very happy and I am super excited to try out the latest bits...

Anxiously awaiting the new bits,

Dan
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down