Print Page | Close Window

Nested Properties in ASP.NET GridView or DetailsView

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=831
Printed Date: 05-May-2024 at 9:59pm


Topic: Nested Properties in ASP.NET GridView or DetailsView
Posted By: danielp37
Subject: Nested Properties in ASP.NET GridView or DetailsView
Date 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



Replies:
Posted By: kimj
Date 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 ...


Posted By: danielp37
Date 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



Print Page | Close Window