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

Enable InputManager Based On Client-Side Input?

2 Answers 89 Views
Input
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 01 Mar 2010, 09:52 PM
I am having troubling figuring this out.  I have a form that accepts information about a user - I am using a radInputManger to validate and all of this works fine.  However, if the user wants to enter a "Joint" applicant - they can by selecting the application type from the form.  When they do this - an entire new panel is displayed with additional fields.  I am then using a different inputmanager for these controls and I want to enable it or disable it when appropriate.

This code does not error - but does not make the CoAppInputManager active either.  How can I do this?

Input Managers:
<telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Windows7"
                  <telerik:TextBoxSetting ErrorMessage="Required!"
                      <TargetControls> 
                          <telerik:TargetInput ControlID="txt_FirstName" /> 
                          <telerik:TargetInput ControlID="txt_LastName" /> 
                          <telerik:TargetInput ControlID="txt_Address" /> 
                          <telerik:TargetInput ControlID="txt_City" /> 
                          <telerik:TargetInput ControlID="txt_Employer" /> 
                          <telerik:TargetInput ControlID="txt_Occupation" /> 
                      </TargetControls> 
                    <Validation IsRequired="True" ValidationGroup="LoanApplication"></Validation> 
                  </telerik:TextBoxSetting> 
</telerik:RadInputManager> 
 
<telerik:RadInputManager ID="radCoAppInputManager" runat="server" Skin="Windows7"
        <telerik:TextBoxSetting ErrorMessage="Required!"
                      <TargetControls> 
                          <telerik:TargetInput ControlID="txt_CoFirstName" /> 
                          <telerik:TargetInput ControlID="txt_CoLastName" /> 
                          <telerik:TargetInput ControlID="txt_CoOccupation" /> 
                          <telerik:TargetInput ControlID="txt_CoEmployer" /> 
                          <telerik:TargetInput ControlID="txt_CoAddress" /> 
                          <telerik:TargetInput ControlID="txt_CoCity" /> 
                      </TargetControls> 
                    <Validation IsRequired="True" ValidationGroup="LoanApplication"></Validation> 
                  </telerik:TextBoxSetting> 
</telerik:RadInputManager> 

Javascript:
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
    
         <script language="javascript" type="text/javascript"
                <!-- 
 
             function ToggleAppType(sender, eventArgs) { 
                 var item = eventArgs.get_item(); 
                 var im_AppType = $find("<%= radCoAppInputManager.ClientID %>");  
 
                 if (item.get_value() == "Joint") { 
                     document.getElementById("Co-Applicant").style.display = "block"
                     im_AppType.enabled = true
                     // document.getElementById("radCoAppInputManager").visible = true; 
                 } 
                 else { 
                     document.getElementById("Co-Applicant").style.display = "none"
                     im_AppType.visible = false
                     // document.getElementById("radCoAppInputManager").visible = false; 
                 } 
 
             } 
</script> 
</telerik:RadCodeBlock> 


So is there a way to enable and disable the radinput manager client-side, or will i have to do a post-back? I really don't want to have to do that...






2 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 03 Mar 2010, 06:20 PM
So if I cant enable or disable an input manager client-side, can I just add and remove textboxes to my current one based on selection? 
0
Yavor
Telerik team
answered on 04 Mar 2010, 06:54 AM
Hello Shawn,

Our records indicate, that you have opened a forum post identical to the one here. To avoid duplicate posts, we can continue our communication there. You can refer to it for more information on the matter.

Best wishes,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Input
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or