RadListBox header Templet from Server side

2 posts, 1 answers
  1. Sravan
    Sravan avatar
    7 posts
    Member since:
    Jul 2011

    Posted 05 Dec 2012 Link to this post

    How to access RadListBox header Templet elements in server side and  in ItemDataBound?
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Dec 2012 Link to this post

    Hi Sravan,

    Try the following code snippet to access the controls in the HeaderTemplate.

    ASPX:
    <HeaderTemplate>
       <asp:TextBox ID="TextBoxID" runat="server"></asp:TextBox>
    </HeaderTemplate>

    C#:
    protected void RadListBox1_ItemDataBound(object sender, Telerik.Web.UI.RadListBoxItemEventArgs e)
        {
            TextBox txt = (TextBox)RadListBox1.Header.FindControl("TextBoxID");
        }

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top