Hi Marc, Geoff,

Thanks for the info guys.  I looked into the custom descriptor implementation 
that Geoff suggested yesterday, and ended up with something very similar to the 
"Expando" that Marc posted.  The code I was using already had a fairly complete 
implementation for these additional field definitions (and persisting the 
results), so I just hooked it up with that, and it worked pretty much worked 
right away (except for a confusing few minutes where I had only overridden one 
of the two GetProperties methods - the implementation worked in some situations 
but not others... took a while to spot the problem).  I am pretty happy with 
the solution overall, it solves a lot of problems with minimal or no impact on 
other code - thanks again for suggesting it.

Regards,

Daniel.


-----Original Message-----
From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf 
Of Marc Brooks
Sent: 22 April 2008 08:46 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Handling user defined fields using custom data 
binding

> I am trying to solve a problem involving user-configurable "fields" on an
> object.   Typically, these fields are configured by each client, and it is
> quite easy to access them programmatically - a quick example would be:

You could/should use an Expando like this:


<snip/>

===================================
This list is hosted by DevelopMentor�  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to