This is a migrated thread and some comments may be shown as answers.

RadListBox header Templet from Server side

1 Answer 94 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Sravan
Top achievements
Rank 1
Sravan asked on 05 Dec 2012, 02:32 PM
How to access RadListBox header Templet elements in server side and  in ItemDataBound?

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 06 Dec 2012, 05:04 AM
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.
Tags
ListBox
Asked by
Sravan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or