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

Problem with Enable the control in another class

3 Answers 51 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Srini
Top achievements
Rank 1
Srini asked on 10 Aug 2009, 06:16 AM
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.
        }

3 Answers, 1 is accepted

Sort by
0
Srini
Top achievements
Rank 1
answered on 11 Aug 2009, 07:33 AM
// 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);
        }
0
Valentin.Stoychev
Telerik team
answered on 12 Aug 2009, 11:50 AM
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.
0
Srini
Top achievements
Rank 1
answered on 13 Aug 2009, 03:57 AM
Hello,
  Thanks for your reply. It is working fine now..
Tags
ComboBox
Asked by
Srini
Top achievements
Rank 1
Answers by
Srini
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or