Problem with Enable the control in another class

4 posts, 0 answers
  1. Srini
    Srini avatar
    41 posts
    Member since:
    Jul 2009

    Posted 10 Aug 2009 Link to this post

    I have a RadTreeView in my one NavigationUserControl among that i disabled one Item as false in UserControl Constructor... Then i try to Enable it in another SearchUserControl Button_Click event but it is failed to change...

     

    //Navigation UserControl's Constructor

            public NavigationUC()
            {
                InitializeComponent();
                observable.AddObserver(this);
                rtvManageAccount.IsEnabled = false;
            }

    //Here i Disabled the Controls IsEnabled propertie to false.

    //SearchUserControls Click event

            private void btnSearch_Click(object sender, RoutedEventArgs e)
            {
                ServiceManager.CustSearchSVC.GetCustomerSearchAsync();
                ServiceManager.CustSearchSVC.GetCustomerSearchCompleted += new               EventHandler<AMSDemo.CustSearchWS.GetCustomerSearchCompletedEventArgs>(CustSearchSVC_GetCustomerSearchCompleted);

                // Here i dont wanna Create a new object for that UserControl but i want to get the existing instance and want to enable it.
            }

  2. Srini
    Srini avatar
    41 posts
    Member since:
    Jul 2009

    Posted 11 Aug 2009 Link to this post

    // NavigationClass where i have RadTreeView
            public void Test(bool boolValue)
            {
                this.rtvOpenNewAccount.IsEnabled = boolValue;
            }
            public static NavigationUC staticVar = null;
            public static NavigationUC Instance()
            {
                if (staticVar == null)
                    staticVar = new NavigationUC();
                return staticVar;
            }

    // This is SomeOtherClass where i'm getting the existing instance to make the RadTreeViewItem Disable
            private void btnSearch_Click(object sender, RoutedEventArgs e)
            {
                NavigationUC nav = NavigationUC.Instance();
                nav.Test(false);
            }
  3. DevCraft banner
  4. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 12 Aug 2009 Link to this post

    Hello Srini,

    We are aware of this problem and it is fixed in the today's Q2.SP1 release of RadControls for Silverlight.

    Please let us know if you need more help on that.

    All the best,
    Valentin.Stoychev
    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.
  5. Srini
    Srini avatar
    41 posts
    Member since:
    Jul 2009

    Posted 12 Aug 2009 Link to this post

    Hello,
      Thanks for your reply. It is working fine now..
Back to Top