Error in RadInputManager - ASP

10 posts, 0 answers
  1. Eva
    Eva avatar
    65 posts
    Member since:
    Oct 2007

    Posted 02 Jan 2009 Link to this post

    Hi,
    I am getting following error

    Microsoft JScript runtime error: 'null' is null or not an object

    in rad input manager

    it fails on var ids=com.get_targetControlIDs();  while debugging


    get_regExpTextBoxSettings:

    function(){

     

     

    return

    this.get_inputSettings(Telerik.Web.UI.RadRegExpTextBoxComponent);

     

    },get_textBoxSettings:

     

    function(){

     

     

    return

    this.get_inputSettings(Telerik.Web.UI.RadTextBoxComponent);

     

    },get_numericTextBoxSettings:

     

    function(){

     

     

    return

    this.get_inputSettings(Telerik.Web.UI.RadNumericTextBoxComponent);

     

    },get_dateInputSettings:

     

    function(){

     

     

    return

    this.get_inputSettings(Telerik.Web.UI.RadDateInputComponent);

     

    },_onSubmit:

     

    function(){

     

     

    var

    i;

     

     

    for

    (i in this._getSettings()){

     

     

    this

    ._beforeSubmit(this._getSettings()[i]);

     

    }

    },_beforeSubmit:

     

    function(com){

     

     

    var

    ids=com.get_targetControlIDs();

     

     

    for

    (i=0;i<ids.length;i++){

     

    com.get_targetInput(ids[i])._beforeSubmit();

    }

     


    My  ascx page code looks like

     

    <asp:TextBox ID="txtQty" runat="server" Height="20px" ></asp:TextBox>

     

     

     

    <telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Vista">

     

     

     

    <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior1"

     

     

     

    ValidationExpression="^\d+$" ErrorMessage="Invalid Quantity">

     

     

     

    <TargetControls >

     

     

     

    <telerik:TargetInput ControlID="txtQty" />

     

     

     

    </TargetControls>

     

     

     

    </telerik:RegExpTextBoxSetting>

     

     

     

    </telerik:RadInputManager>

     

     



    Please let me know what i am missing here ASP.

    Thanks.
    Eva



  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 06 Jan 2009 Link to this post

    Hello Eva,

    Are the input controls 'inputified' by the RadInputManager immediately available on the page on initial load or displayed afterwards? Note that we discovered a bug with the control in the second scenario which should be addressed for the Q3 2008 SP2 release, expected by the end of the next week.

    In the meantime you can download the latest internal trial build of RadControls for ASP.NET AJAX from this section after logging from your Telerik account. Please migrate to it following the instructions from here and let me know how it goes.

    Best regards,
    Sebastian
    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. Chris O
    Chris O avatar
    56 posts
    Member since:
    May 2006

    Posted 12 Jan 2009 Link to this post

    Is the sp2 release still slated for the end of this week?  I too am having this issue and need it resolved before going forward.

    Thanks, - Love the new Inputmanager

    Chris
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 13 Jan 2009 Link to this post

    Hello Chris,

    Yes, the Q3 2008 SP2 version of RadControls for ASP.NET AJAX is expected by the end of this week. You may be happy to know that it may be available in public by the end of the day today or tomorrow.

    Best regards,
    Sebastian
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Chris O
    Chris O avatar
    56 posts
    Member since:
    May 2006

    Posted 13 Jan 2009 Link to this post

    Thanks, please also see my other post regarding the issue with sharedcalendar with the current dev build.  Just wanted to make you aware of that.

    Thanks,
    Chris
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 13 Jan 2009 Link to this post

    Hi Chris,

    We will review the thread and respond back there.

    Best regards,
    Sebastian
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 03 Jun 2009 Link to this post

    Hey folks.
    I just ran into this same error.
    It's happening on a post back when using the radInputManager. When I comment out the crus of the inputManager markup, the error does not occur.

    We're doing an explicit postback using __dopostback.
    When we switch the __doPostBack to window.location.reload() there was no error. It looks like the input manager isn't a fan of postbacks.

    It's breaking here
    beforeSubmit:function(com){ 
    var ids=com.get_targetControlIDs(); //breaks here!
    for(i=0;i<ids.length;i++){ 
    com.get_targetInput(ids[i])._beforeSubmit(); 

    My inputManager markup is quite simple.
          <%-- The following TextBox is required by the InputManager --%>  
        <asp:TextBox ID="dummy1" runat="server"  style="display:none" />  
        <asp:TextBox ID="dummy2" runat="server"  style="display:none" />  
        <telerik:RadInputManager  ID="RadInputManager" runat="server" Skin="Vista"
            <telerik:NumericTextBoxSetting BehaviorID="NumericSettings" InitializeOnClient="true" Type="Number" DecimalDigits="1" GroupSizes="3" GroupSeparator="," PositivePattern="n" NegativePattern="-n">  
                <TargetControls> 
                    <telerik:TargetInput ControlID="dummy1" /> 
                </TargetControls> 
            </telerik:NumericTextBoxSetting> 
            <telerik:TextBoxSetting BehaviorID="TextSettings" InitializeOnClient="true"  > 
                <TargetControls> 
                    <telerik:TargetInput ControlID="dummy2" /> 
                </TargetControls> 
            </telerik:TextBoxSetting> 
        </telerik:RadInputManager> 

    As is the code to load it with input controls
                var im = $find("<%= RadInputManager.ClientID %>"); 
                var numericSetting = im.get_inputSettings("NumericSettings"); 
     
                //get all numeric data format text boxes and convert them into numeric only 
                var elements = $('input.numeric'); 
                generateInputIds(elements); 
                var numericSettings = $find('RadInputManager').get_inputSettings('NumericSettings'); 
                Array.forEach(elements, function(element) { 
                    numericSettings.addTargetInput(element.id); 
                }); 
     
                //get all ascii data format text boxes and convert them into text 
                elements = $('input.ascii'); 
                generateInputIds(elements); 
                var textSettings = $find('RadInputManager').get_inputSettings('TextSettings'); 
                Array.forEach(elements, function(element) { 
                    textSettings.addTargetInput(element.id); 
                }); 

    Any help would be great. Thanks.


    AjaxControlToolkit 3.0.20229.20843
    Telerik.Web.UI 2008.3.1314.35
  9. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 05 Jun 2009 Link to this post

    Hello Matt,

    Please try upgrading to the latest version of the controls (2009 Q1 527) and let us know if the problem persists. You can read more on how to upgrade in this Knowledge Base article.

    Greetings,
    Pavel
    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.
  10. Richard Weissenberg
    Richard  Weissenberg avatar
    11 posts
    Member since:
    Jun 2009

    Posted 16 Oct 2009 Link to this post

    Hi,

    The input manager looks like a great control set. I am having issues when dynamically adding textboxes requiring formatting (added via Anthem callbacks. The information on the forums have helped overcome a number of issues so thanks for that!

    I was just wondering why when adding input ids to using the addTargetInput on the client side is there a need to
    run a function like generateInputIds(elements);? What is in here exactly and why would one need it?

    My problem is where I am dynamically adding textboxes to the page (via Anthem call back). Once the callback completes, the textboxes are on the page and I then use client side API to add the target controls to the input manager/numeric settings. But I tend to get inconsistent results: some textboxes abide by the settings while others don't. On subsequent callbacks the behaviour switches round. As soon as I run generateInputIds, mine looks like this (wild guess here)

    function generateInputIds(elements) { 
        for (var i = 0; i < elements.length; i++) { 
            elements[i].id = elements[i].id + '$'+ i; 
        }   

    then the inconsistencies dissapears. Changing the ids is going to cause some problems when I finally submit my page to the server since the ids on the client are now different to the server?

    I am using dll 2009.2.701.35.

    Insight to this problem will be highly appreciated.

    Thanks


  11. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 22 Oct 2009 Link to this post

    Hello Richard,

    I am not sure I understand your scenario completely. Are you adding InputSettings on the client? If this is the case you should know that  this is generally not supported. I can suggest you to check our examples to get a better idea of what can be done with the RadInputManager control.

    Regards,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017