OK, I am sure this is easier than I am making this out to be, but how do you bind the elements in the Item Template during the ItemDataBound event? Here is my aspx code:
I want to access my control, but am not sure how to get at it:
I tried e.Item.FindControl("ctrlQuestion"), but it always returns null.
Any help would be greatly appreciated!
| <telerik:RadPanelBar ID="RadPanelBar1" Width="100%" runat="server" |
| onitemdatabound="RadPanelBar1_ItemDataBound"> |
| <Items> |
| <telerik:RadPanelItem Text="Help" ImageUrl="/Images/question.png" Expanded="True"> |
| <ItemTemplate> |
| <uc1:ctrlQuestion ID="ctrlQuestion" runat="server" /> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelBar> |
I want to access my control, but am not sure how to get at it:
|
... RadPanelBar1.DataBind(); ...protected void RadPanelBar1_ItemDataBound(object sender, Telerik.Web.UI.RadPanelBarEventArgs e) |
| { |
| //????? ctrlQuestion.CallSomeMethod(); |
| } |
I tried e.Item.FindControl("ctrlQuestion"), but it always returns null.
Any help would be greatly appreciated!