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

Questionat about RadPanelbar_ItemDataBound event...

1 Answer 65 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 09 Jul 2008, 07:10 PM
Here is my control:
<radP:RadPanelbar ID="RadPanelbar1" runat="server"   
    Skin="VPort" SkinsPath="~\RadControls\Panelbar\Skins" 
    ExpandAnimation-Duration="0" ExpandAnimation-Type="None"   
    BackColor="#FFFFFF">  
    <ItemTemplate> 
        <span id='spText' onmouseover='javascript:fnChangeRowColor(this, 1);'   
            style='text-align:left;float:left;display:inline;top:1px;text-decoration:underline;'>  
                <asp:label ID="lbl" runat="server"></asp:label> 
            </span> 
        <span id='spImages' style='text-align:right;float:right;display:inline;vertical-align:middle;'>  
            <asp:Image ID="img1" runat="server" ImageUrl="~/spacer.gif" 
        </span> 
    </ItemTemplate> 
</radP:RadPanelbar> 

If i call event RadPanelBar1_ItemDataBound how do I get access to the controls "lbl" and "img1"?

This is what I have so far:
    void RadPanelbar1_ItemDataBound(object sender, RadPanelbarEventArgs e)  
    {  
        RadPanelItem item = e.Item;  
        DataRowView dataRow = (DataRowView)e.Item.DataItem;  
    } 

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Jul 2008, 07:37 AM
Hi Jason,

You should use the FindControl method:

Label label = (Label)e.Item.FindControl("lbl");

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
PanelBar
Asked by
J
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or