I have added the DownloadListView to a user control, because I need a way to use this control wherein the selected library is set dynamically.
I had hoped to simply put the following code in either the Page_Load or Page_PreRender handlers of the code behind:
However, the assignment seems to be ignored.
downloadListView.MasterViewDefinition.ItemsParentId = DynamicallyDetermineParentId();
Attempting to analyze the source code makes me think that the MasterViewDefinition is loaded and processed from within CreateChildControls. If that is the case, then I would never have an opportunity to override a property in the MasterViewDefinition. I then presume that the only way to make this work is to sub-class DownloadListView, override CreateChildControls, re-implement the method body with the same source code of the original, with the addition of setting the above mentioned property before calling this.LoadView(viewName).
Is that the only way to solve this problem?