This is a migrated thread and some comments may be shown as answers.

ClientEvents-OnValueChanged With RadInputManager

7 Answers 272 Views
Input
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 10 Nov 2008, 11:02 AM
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

7 Answers, 1 is accepted

Sort by
0
Missing User
answered on 10 Nov 2008, 11:43 AM
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.
0
Ali
Top achievements
Rank 1
answered on 10 Nov 2008, 05:04 PM
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
0
Missing User
answered on 11 Nov 2008, 11:19 AM
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.
0
Ali
Top achievements
Rank 1
answered on 12 Nov 2008, 11:28 AM
how can I get old value, eg. eventArgs.get_oldValue() ?

Ali
0
Missing User
answered on 12 Nov 2008, 01:06 PM
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.
0
Rogerick
Top achievements
Rank 1
answered on 13 Jul 2009, 08:23 PM

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

Thanks.
0
Iana Tsolova
Telerik team
answered on 14 Jul 2009, 09:02 AM
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.
Tags
Input
Asked by
Ali
Top achievements
Rank 1
Answers by
Missing User
Ali
Top achievements
Rank 1
Rogerick
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or