Io utilizzavo il seguente codice
codice:
<asp:repeater id="RepeaterExt" runat="server"
onItemDataBound="RepeaterEvents">
<HeaderTemplate>
<table>
<tr>
</HeaderTemplate>
<ItemTemplate>
<td>
<table>
<tr>
<td><%#
DataBinder.Eval(Container.DataItem,"RagioneSociale")%>
</td>
</tr>
<asp:repeater id="RepeaterInt" runat="server">
<ItemTemplate>
<tr>
<td><%#
DataBinder.Eval(Container.DataItem,"Descrizione")%>
</td>
</tr>
</ItemTemplate>
</asp:repeater>
</table>
</td>
</ItemTemplate>
<FooterTemplate>
</TR>
</TABLE>
</FooterTemplate> </asp:repeater>
protected void RepeaterEvents( Object src, RepeaterItemEventArgs e )
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
Repeater innerRepeater = (Repeater)e.Item.FindControl("RepeaterInt");
DataRowView rowView = (DataRowView)e.Item.DataItem;
string consulente = (string)rowView["CodiceAzienda"];
DataView vw = new DataView(DsDati.Tables["Calendario"]);
RepeaterInt.DataSource = vw;
RepeaterInt.DataBind();
}
}
ma in corrispondenza di
RepeaterInt.DataSource = vw;
RepeaterInt.DataBind();
ottengo:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Se invece separo i duerepetar, il problema non si pone!
Come posso risolvere questo problema?
Grazie 1000