RadInputManager in code

2 posts, 0 answers
  1. Ricardo Fonseca
    Ricardo  Fonseca avatar
    2 posts
    Member since:
    Aug 2005

    Posted 23 Feb 2010 Link to this post

    I want to create a web control that has a RadInputmanager , and i am having the follow exception .
    [NullReferenceException: Object reference not set to an instance of an object.]
    System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +219
    System.Web.UI.Page.FindControl(String id) +38
    Telerik.Web.ChildControlHelper.FindControlRecursive(Control searcher, String ID) +68
    Telerik.Web.UI.RadInputManager.PopulateInputCollection() +401
    Telerik.Web.UI.RadInputManager.OnPreRender(EventArgs e) +454
    System.Web.UI.Control.PreRenderRecursiveInternal() +90


    here is the base code
       private RadInputManager inputManger = new RadInputManager();
            private TargetInput target = null;
            CPFTextString cText = new CPFTextString(); // ibased om  public class CPFTextString : RegExpTextBoxSetting
            public CPFControl()
                : base()
            {

            }

            protected override void OnInit(EventArgs e)
            {
                
                target = new TargetInput(cBox.ID,true );
                cText.TargetControls.Add(target);
                inputManger.InputSettings.Add(cText);
                Controls.Add(inputManger);
                base.OnInit(e);
            }



  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 25 Feb 2010 Link to this post

    Hello Ricardo,

    Could you please try first adding the RadInputManager to the controls collection and then adding target inputs for its setting? Give it a try and let me know if it makes any difference.

    All the best,
    Iana
    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