C
Charlie@CBFC
Hi:
I'm laying out a hieraracical report by nesting repeater controls. I'm
using panels to expand/collapse detail sections. To access a panel in a
nested repeater, I use the following code. The problem is I can get a
reference to a nested repeater, but can not use that reference to access the
panel within.
protected void rptrOrders_ItemCommand(object source,
System.Web.UI.WebControls.RepeaterCommandEventArgs e) {
Repeater rpt = (Repeater) e.Item.FindControl("rptrItems");
Panel pnl = (Panel) rpt.FindControl("panelItems"); // Problem here,
returns null
if (pnl.Visible == false) {
pnl.Visible = true;
}
else {
pnl.Visible = false;
}
}
I'm laying out a hieraracical report by nesting repeater controls. I'm
using panels to expand/collapse detail sections. To access a panel in a
nested repeater, I use the following code. The problem is I can get a
reference to a nested repeater, but can not use that reference to access the
panel within.
protected void rptrOrders_ItemCommand(object source,
System.Web.UI.WebControls.RepeaterCommandEventArgs e) {
Repeater rpt = (Repeater) e.Item.FindControl("rptrItems");
Panel pnl = (Panel) rpt.FindControl("panelItems"); // Problem here,
returns null
if (pnl.Visible == false) {
pnl.Visible = true;
}
else {
pnl.Visible = false;
}
}