ClientEvents-OnValueChanged With RadInputManager

8 posts, 0 answers
  1. Ali
    Ali avatar
    120 posts
    Member since:
    Jan 2007

    Posted 10 Nov 2008 Link to this post

    hi,

    How can I replace RadNumericTextbox (attached with client event OnValueChanged) with RadInputManager and Asp:Textbox? As InputManager only exposes "OnBlur, OnError, OnFocus and OnKeyPress" events.

    Thanks

    Ali
  2. Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 10 Nov 2008 Link to this post

    Hi Ali,



    You can use onchange event handler. This event is fired when the contents are committed. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus. In addition, this event is executed before the code specified by onblur when the control is also losing the focus.

    The following example demonstrates how to execute some JavaScript code when a user changes the content of an TextBox control:

        <div> 
            <script type="text/javascript"
                function change() { 
                    var manager = $find("<%= RadInputManager1.ClientID %>"); 
                    var numericInput = manager.get_targetInput("<%= TextBox1.ClientID %>"); 
                    numericInput.clear(); 
                } 
            </script> 
            <telerik:RadInputManager ID="RadInputManager1" runat="server"
                <telerik:NumericTextBoxSetting EmptyMessage="type here..."
                    <TargetControls> 
                        <telerik:TargetInput ControlID="TextBox1" /> 
                    </TargetControls> 
                </telerik:NumericTextBoxSetting> 
            </telerik:RadInputManager> 
             
            <asp:TextBox onchange="change();" ID="TextBox1" runat="server"
            </asp:TextBox>         
        </div> 





    All the best,
    Plamen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ali
    Ali avatar
    120 posts
    Member since:
    Jan 2007

    Posted 10 Nov 2008 Link to this post

    Actually I need two arguments (Source and EventArgs) in the ValueChanged event. I can pass Source but EventArgs is not possible in suggested solution.
    I am already taking decicion on EventArgs and I've around 30+ input controls on a single page. So is there any other way to hook ValueChanged event with Source and EventArgs parameters?

    Thanks

    Ali
  5. Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 11 Nov 2008 Link to this post

    Hi Ali,

    Please find attached a sample web application that demonstrates the needed approach.

    Greetings,
    Plamen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Ali
    Ali avatar
    120 posts
    Member since:
    Jan 2007

    Posted 12 Nov 2008 Link to this post

    how can I get old value, eg. eventArgs.get_oldValue() ?

    Ali
  7. Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 12 Nov 2008 Link to this post

    Hello Ali,

    There is no way to get the old value at the moment. This is certainly a limitation of our RadInputManager control and we will be working on solving the problem with the next release. We apologize for the inconvenience this might be causing you.

    Having any other questions, please feel free to contact us.

    All the best,
    Plamen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Rogerick
    Rogerick avatar
    9 posts
    Member since:
    Nov 2008

    Posted 13 Jul 2009 Link to this post


    I can't download sample application.  It says the it doesn't exist or the location has changed.  Could you repost the application?

    Thanks.
  9. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 14 Jul 2009 Link to this post

    Hi Rogerick,

    I am re-attaching the application in this post.
    Please check it out and let me know if any issues arise.

    Greetings,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017