G
Guest
Using ASP.NET 1.1
----------------------
I have a custom collection of object that I'm binding to a datagrid. Each
of these objects have another collection inside them. I have a user control
that renders the nested collection into html table. See sample code below.
Now this binds fine and my sub collections are rendered fine by my user
control and list appears as it should. The problem is when I do paging. The
sub collections do not bind.
Any help would be appreciated.
Thank in advance,
Suresh.
<asp:datagrid id='dgTest' runat='server'>
<columns>
<asp:templatecolumn>
<itemtemplate>
<!-- Below is from the main collection -->
<%#DataBinder.Eval(Container.DataItem, "AssignmentStatus"))%>
<!-- Below is from the sub collection -->
<uc1:myusrctrl id="ucmyusrctrl" DataSourceItems='<%#
(MySubCollection) DataBinder.Eval(Container.DataItem, "Items") %>'
runat="server"></uc1:myusrctrl>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
----------------------
I have a custom collection of object that I'm binding to a datagrid. Each
of these objects have another collection inside them. I have a user control
that renders the nested collection into html table. See sample code below.
Now this binds fine and my sub collections are rendered fine by my user
control and list appears as it should. The problem is when I do paging. The
sub collections do not bind.
Any help would be appreciated.
Thank in advance,
Suresh.
<asp:datagrid id='dgTest' runat='server'>
<columns>
<asp:templatecolumn>
<itemtemplate>
<!-- Below is from the main collection -->
<%#DataBinder.Eval(Container.DataItem, "AssignmentStatus"))%>
<!-- Below is from the sub collection -->
<uc1:myusrctrl id="ucmyusrctrl" DataSourceItems='<%#
(MySubCollection) DataBinder.Eval(Container.DataItem, "Items") %>'
runat="server"></uc1:myusrctrl>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>