Nested Data Bound UserControl

I needed to have ASP.NET report with DataRepeater and nested data bound user control.
The similar approach is used in 
ASP.NET Reports Starter Kit  with datagrid nested in datalist itemtemplate.

       <asp:datalist id="CategoriesList" runat="server" >
                <itemtemplate>
                                <asp:datagrid id=Datagrid1 runat="server"  DataSource=''
<%# GetDetails(DataBinder.Eval(Container.DataItem, "CategoryID")) %>'
                                </< FONT>asp:datagrid>
                </< FONT>
itemtemplate
>
                <
headerstyle cssclass="ReportTitle"></< FONT>headerstyle
>
            </< FONT>asp:datalist>
 So my markup should be like this: 

<%@ Register Src="MyUserControl.ascx" TagName="MyUserControl" TagPrefix="uc1" %>

<asp:Repeater ID="Repeater1" runat="server">

<ItemTemplate>

<uc1:MyUserControl  DataSource=<%# GetDetails(DataBinder.Eval(Container.DataItem,"PatronId")) %>

 ReportId= <%# ReportID %> id="patronNotice" runat="server" >

</uc1:OverdueNotice>

</ItemTemplate>

</asp:Repeater>

 

I’ve created DataSource property and on DataBinding event used it to populate my UserControl data.
But it didn’t work. DataBinding event occurred earlier than
DataSource was set from DataBinding expression and  DataSource=Nothing.

I’ve read carefully the DataBinding documentation and understood that
DataBind can be called more than once during the same request and it is important to re-do binding if DataSource property has been changed.
So I had to implement
Data Bound User Control class to resolve the issue.

 

«September»
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567