RadTextBox button server click missing?

6 posts, 0 answers
  1. Roland
    Roland avatar
    156 posts
    Member since:
    Feb 2009

    Posted 27 Jan 2010 Link to this post

    I cannot find the RadTextBox button server click event.

    I would expect it to be there since this is a button/

    How to get server click event working ?

    How to add tooltip to the button ?

    Roland
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2010 Link to this post

    Hello Roland,

    The OnButtonClick client-side event handler is called when the user clicks on a button associated with the input control. One suggestion to fire a server event is invoking postback explicitly from the client event handler. Add one invisible button on page and invoke the click method of that which will simulate the buttonclick event.

    css:
     
        <style type="text/css"
            .hideButton 
            { 
                displaynone
            } 
        </style> 

    aspx:
     
    <telerik:RadTextBox ID="RadTextBox6" runat="server" AutoPostBack="True" 
        ShowButton="True"
        <ClientEvents OnButtonClick="OnButtonClick" /> 
    </telerik:RadTextBox> 
     
    <asp:Button ID="Button2" runat="server" CssClass="hideButton" Text="Button" OnClick="Button2_Click" /> 

    cs:
     
        protected void Button2_Click(object sender, EventArgs e) 
        { 
            Response.Write("Button clicked"); 
        } 

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roland
    Roland avatar
    156 posts
    Member since:
    Feb 2009

    Posted 28 Jan 2010 Link to this post

    I was thinking about this, but this is inside user control. I have 10 of those on the page.

    I ended up creating ASP image button.
  5. Natalia
    Natalia avatar
    1 posts
    Member since:
    May 2009

    Posted 17 Aug 2011 Link to this post

    Hi,

    I am developer an user control wich create a RadTextBox and set the property ShowButton= true and the button appears to the right of the textBox.
    Now I need to attack to click event button an ajax event in server side. For that I am using the following line of code:
     

     

     

     

    protected override void CreateChildControls()

     

    {

    ....

     

    txtBox1.ClientEvents.OnButtonClick =

     

    "BtnClick";
    ....
    }

    and I create the method:

     

     

     

    void BtnClick(object sender, EventArgs eventArgs)

     

    {

     

    }

     

     

    But the BtnClick method doesn't fires. How can I do this without use javascript, just server side.

    Please help me.

    Mickna.


  6. Les
    Les avatar
    29 posts
    Member since:
    Feb 2011

    Posted 20 Apr 2013 Link to this post

    I have the same issue....any thoughts on this?
  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 24 Apr 2013 Link to this post

    Hello Mickna,

    In this article you can read more about the OnButtonClick event. It can not be used for your purpose.

    All the best,
    Pavlina
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017