locked
DynamicObjectDataSource: Access Controlling Instance RRS feed

  • Question

  • User-1298853212 posted

    Is there a way to pass an instance of the object that the DynamicObjectDataSource instantiates from the "TypeName" property (or get code-behind access to this instance)?

    I am experimenting with implementing Model-View-Presenter with DynamicData and would like to use an instance of my presenter for the controlling object for the data source control rather than having multiple instances on the page that uses the DynamicObjectDataSource.

    Thanks,

    Craig

    Friday, September 5, 2008 11:40 AM

All replies

  • User1641955678 posted

    Hi Craig, 

    I believe that subscribing to the ObjectCreated event will give you the object you want (or ObjectCreating will let you set the object).  Note that this is general to ObjectDataSource, and not specific to the derived DynamicObjectDataSource.

    David

    Sunday, September 7, 2008 8:45 PM