Good afternoon, how do I get hold of the <telerik: RadButton id = "rbDetails" in my code behind that is within a <telerik: RadListView and within a <ItemTemplate>?

2 posts, 1 answers
  1. Jhon
    Jhon avatar
    8 posts
    Member since:
    Apr 2012

    Posted 28 Sep 2012 Link to this post


    Good afternoon, how do I get hold of the <telerik: RadButton id = "rbDetails" in my codeBehind that is within
    a <telerik: RadListView and within a <ItemTemplate>?

    <telerik:RadListView  ID="RadListView1" 

                          runat="server"

                          ItemPlaceholderID="EmployeesContainer"

                          AllowPaging="True"

                          PageSize="16"

                          BorderColor="Black"

                          BorderStyle="Solid"                                                  ClientDataKeyNames="PersonId"                                                              onitemcommand="RadListView1_ItemCommand"                                                           

                          onPageIndexChanged="RadListView1_PageIndexChaged"

                          style="background-color:#edf2f7"

                           >
                                     

                          <LayoutTemplate> 

                          <div id="radList" runat="server" style=" background-color: #EDF2F7;   cursor: pointer; font-size:12px; moz-border-radius: 5px">                                     

                          <fieldset id="FieldSet1"  >

                           <asp:PlaceHolder ID="EmployeesContainer" runat="server" />

                           <div style="clear: both; background-color:EDF2F7" />

                           <div>                                                                   

                           </div>

                           </fieldset>

                          </div>

                           </LayoutTemplate>

     

                            <%-- ########## Fields ########## --%>

                           <ItemTemplate>

                                <div id="listView" runat="server" style="color:Black" >

                                 <div class="item" id="tudo" style="width:205px; height:100px">

                                  <div style="width:100%; height:20px; margin-left:5px; float:left">

                                   <a style="font-family: Calibri; font-weight: bold; font-size: 14px;"> <%#Eval("Name")%></a>

                                      </div>

                                    <div id="Div3" style="width:100%; margin-left:5px; height:20px; float:left"></div>

                                  <div id="entity2" style="width:100%; margin-left:5px; height:15px; float:left">

                                 <%#Eval("Abbreviation")%>

                             </div>

                                     <div id="function2" style="width:100%; margin-left:5px; height:15px; float:left">

                                       <%#Eval("JobTitleDescription")%>

                                     </div>

                                   <div id="voip2" style="width:53%; margin-left:5px; float:left">

                               <%# Eval("VoipNumber")%>

                              </div>

                             <%-- ########## Button Details ########## --%>

                              <div id="divDetails" runat="server" style="width:5%; margin-left:2px; float:left">

                             <telerik:RadButton ID="rbDetails" runat="server" Text="Detalhes" Skin="Office2007" CommandName="details" Visible="false" >

                              <Icon PrimaryIconUrl="../Images/btns/btnMostra.png"  PrimaryIconTop="2px" PrimaryIconLeft="4px" PrimaryIconWidth="30px" PrimaryIconHeight="30px" />

                              </telerik:RadButton>

                                 </div>

                                    </div>

                                       </div>

                                    </ItemTemplate>

                                  <SelectedItemTemplate>                                       

                              </SelectedItemTemplate>

                              </telerik:RadListView>

     

     
  2. Answer
    Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 03 Oct 2012 Link to this post

    Hi Jhon,

    Please take a look at the following help article about accessing controls in RadListView and let us know if you need further assistance.

    Kind regards,
    Kostadin
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top