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

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>?

1 Answer 62 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jhon
Top achievements
Rank 1
Jhon asked on 28 Sep 2012, 07:23 PM


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>

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Kostadin
Telerik team
answered on 03 Oct 2012, 10:10 AM
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.
Tags
ListView
Asked by
Jhon
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or