Access controls

2 posts, 0 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 14 Feb 2012 Link to this post

    How can i access checkbox in toolbar button click?
    aspx:
    <telerik:RadToolBar ID="RadTool" runat="server" AutoPostBack="true" onbuttonclick="RadTool_ButtonClick" >
     <Items>
        <telerik:RadToolBarButton runat="server" Text="Edit"></telerik:RadToolBarButton>
    <ItemTemplate>
    <asp:CheckBox ID="CheckBox1" runat="server" />
    </ItemTemplate>
    </telerik:RadToolBarButton>
    </Items>
    </telerik:RadToolBar>
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Feb 2012 Link to this post

    Hello,

    Try the following code.
    C#:
    protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
     {
        RadToolBarItem textItem = RadToolBar1.FindItemByText("Edit");
        CheckBox CheckBox1 = (CheckBox)textItem.FindControl("CheckBox1");
     }

    Thanks.
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top