How to get a TextChanged event of RadTextBox which is inside RadToolBor.

2 posts, 0 answers
  1. Simon Maystre
    Simon Maystre avatar
    22 posts
    Member since:
    Aug 2012

    Posted 27 Apr 2012 Link to this post

    Hi Telerik Team,

    I have a RadTextBox in a RadToolBar mentioned below...

    i want to write some code on TextChanged event of RadTextBox which is inside RadToolBor, please suggest how to get a TextChanged event and do the needful.

     <telerik:RadToolBar ID="rtbPDFToolbar" runat="server" Width="100%">
            <Items>
                <telerik:RadToolBarButton runat="server" CausesValidation="False" PostBack="False"
                    Text="SearchText" Value="SearText">
                    <ItemTemplate>
                        <telerik:RadTextBox runat="server" ID="radtxtSerachDocument">
                        </telerik:RadTextBox>
                    </ItemTemplate>
                </telerik:RadToolBarButton>
               </Items>
    </telerik:RadToolBar>

    Thanks,
    Simon.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Apr 2012 Link to this post

    Hi Simon,

    Here is the sample code that worked for me as expected.

    ASPX:
    <telerik:RadToolBar ID="rtbPDFToolbar" runat="server" Width="100%">
            <Items>
                <telerik:RadToolBarButton runat="server" CausesValidation="False" PostBack="False"  Text="SearchText" Value="SearText">
                    <ItemTemplate>
                        <telerik:RadTextBox runat="server" ID="radtxtSerachDocument" ontextchanged="radtxtSerachDocument_TextChanged" AutoPostBack="true">
                        </telerik:RadTextBox>
                    </ItemTemplate>
                </telerik:RadToolBarButton>
            </Items>
    </telerik:RadToolBar>

    C#:
    protected void radtxtSerachDocument_TextChanged(object sender, EventArgs e)
        {
             Response.Write("text Changed");
        }

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