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

RadInputManager in code

1 Answer 92 Views
Input
This is a migrated thread and some comments may be shown as answers.
Ricardo Fonseca
Top achievements
Rank 1
Ricardo Fonseca asked on 24 Feb 2010, 12:31 AM
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);
        }



1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 25 Feb 2010, 03:48 PM
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.
Tags
Input
Asked by
Ricardo Fonseca
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or