I have a form view with an item template with a control inside, is it possible to access that control OnDatabound so I can bind the control with data. I'm using a panel as an example here.
<cc1:LOEDFormView ID="FireFormView" runat="server" DataSourceID="DataSourceResults" CssClass="EditForm" DataKeyNames="id" OnDatabound="FireFromView_Databound">
<ItemTemplate>
<asp:Panel ID ="pnl" runat="server"></asp:Panel>
</ItemTemplate>
</cc1:LOEDFormView>
You have to take care the item mode as well in which your control exist which you want to find. Like if your control in Item Template, then it would be like..
if (FormView1.CurrentMode == FormViewMode.ReadOnly)
{
Panel pnl = (Panel)FormView1.FindControl("pnl");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With