Enable InputManager Based On Client-Side Input?

3 posts, 0 answers
  1. Shawn
    Shawn avatar
    83 posts
    Member since:
    Jan 2009

    Posted 01 Mar 2010 Link to this post

    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. Shawn
    Shawn avatar
    83 posts
    Member since:
    Jan 2009

    Posted 03 Mar 2010 Link to this post

    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? 
  3. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 04 Mar 2010 Link to this post

    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.
Back to Top