Get button click event in itemTemplate in radToolBar

2 posts, 0 answers
  1. Shannnon
    Shannnon avatar
    31 posts
    Member since:
    Oct 2010

    Posted 04 Apr 2011 Link to this post

    I have two button in RadComboBox in RadToolBarButton ItemTemplate:
    <telerik:RadToolBarButton Font-Size="X-Small" CausesValidation="false" Value="column">
                             <ItemTemplate>
                             <table>
                             <tr>
                               <td align="right" valign="top">
                     <telerik:RadComboBox ID="RadComboBoxAddColumns" Height="20px" runat="server" EmptyMessage="Add Columns" HighlightTemplatedItems="True" AllowCustomText="True" Width="150px" 
                                    Skin="Windows7"
                                <ItemTemplate>
                                    <div>
                                        <asp:CheckBox runat="server" ID="chk1" Checked="false" Font-Size="X-Small"/><%# Eval("COLUMN_NAME") %>
                                    </div>      
                                </ItemTemplate>
                                <FooterTemplate>
                                <div
                                    <asp:Button ID="btnAdd" runat="server" Text="Add" CssClass="button" OnClick="btnAdd_Click"/>   <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="button" 
                                                OnClick="btnReset_Click"/>
                                </div>
                                </FooterTemplate>
                      </telerik:RadComboBox>  
                </td>
                </tr></table>
                             </ItemTemplate>
                            </telerik:RadToolBarButton>
    And I need to map the code behind click event for each button, I can get reference of the button:
    Button btnAdd = (Button)RadToolBar1.FindItemByValue("column").FindControl("RadComboBoxAddColumns").FindControl("btnAdd");
    But how do I know which button is clicked? Please help!

    Thanks a lot!
  2. Shannnon
    Shannnon avatar
    31 posts
    Member since:
    Oct 2010

    Posted 04 Apr 2011 Link to this post

    I got it work right, the button click can automatically map to the right button.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top