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

Access controls inside header template

1 Answer 93 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Roukaya
Top achievements
Rank 2
Roukaya asked on 23 Apr 2013, 07:25 AM
hi all , 
 
I have a radpanel bar with header template (dynamically created) , 
this header template contains multiple Image button with specific id for each one, 

my question is : how can i access Image buttons from Item_click event of radpanelbar ..

thanks in advance 

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 23 Apr 2013, 01:05 PM
Hello Roukaya,

You can get the needed PanelItem (either by index or using the event argument in the server-side event) and using find the control from the header template by using either of the code lines below:
// when used with the ItemClick event of the RadPanelBar
e.Item.Header.FindControl("Label2ID");
 
//find panel item by index when used from a different control
RadPanelBar1.Items[0].Header.FindControl("Label2ID");

You can also find my simplified runnable page for further reference. 

All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
PanelBar
Asked by
Roukaya
Top achievements
Rank 2
Answers by
Kate
Telerik team
Share this question
or