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

Bug: RadTreeView cannot be enabled once it's been disabled

11 Answers 108 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 01 Dec 2008, 01:52 PM
Once IsEnabled has been set to false, it cannot be enabled again. Here's an example:

<UserControl x:Class="SilverlightApplication4.Page3" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
             xmlns:teleriknav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
             xmlns:telerikbase="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
             Width="400" 
             Height="300"
    <Grid x:Name="LayoutRoot" 
          Background="White"
        <StackPanel> 
            <teleriknav:RadTreeView x:Name="RadTreeView1"
                <teleriknav:RadTreeView.Items> 
                     
                    <teleriknav:RadTreeViewItem Header="node 1"
                        <teleriknav:RadTreeViewItem.Items> 
                            <teleriknav:RadTreeViewItem Header="node 1 - 1"></teleriknav:RadTreeViewItem> 
                            <teleriknav:RadTreeViewItem Header="node 1 - 2"></teleriknav:RadTreeViewItem> 
                        </teleriknav:RadTreeViewItem.Items> 
                    </teleriknav:RadTreeViewItem> 
                     
                    <teleriknav:RadTreeViewItem Header="node 2"
                        <teleriknav:RadTreeViewItem.Items> 
                            <teleriknav:RadTreeViewItem Header="node 2 - 1"></teleriknav:RadTreeViewItem> 
                            <teleriknav:RadTreeViewItem Header="node 2 - 2"></teleriknav:RadTreeViewItem> 
                        </teleriknav:RadTreeViewItem.Items> 
                    </teleriknav:RadTreeViewItem> 
                </teleriknav:RadTreeView.Items> 
            </teleriknav:RadTreeView> 
             
            <Button Content="toggle" Click="Button_Click"></Button> 
        </StackPanel> 
    </Grid> 
</UserControl> 
 

And the code-behind:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Net; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Animation; 
using System.Windows.Shapes; 
 
namespace SilverlightApplication4 
    public partial class Page3 : UserControl 
    { 
        public Page3() 
        { 
            InitializeComponent(); 
        } 
 
        private void Button_Click(object sender, RoutedEventArgs e) 
        { 
            RadTreeView1.IsEnabled = !RadTreeView1.IsEnabled; 
        } 
    } 
 

11 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 02 Dec 2008, 10:10 AM
Hi Henrik,

I was able to reproduce and fix the bug. The fix will be available in the upcoming SP2 of RadControls for Silverlight after a couple of weeks. If you need it earlier, open a support ticket and I will send you a custom build.

All the best,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hwsoderlund
Top achievements
Rank 1
answered on 02 Dec 2008, 11:13 AM
No worries, I'll wait for the next release.
0
Christian
Top achievements
Rank 1
answered on 01 Sep 2009, 01:08 PM
Hi Folks,

I'm working on a silverlight 2.0 project and have been using the 2009.1.526.1020 version of the "RadControls for Silverlight" up until now. Today I added two methods to my main user control which set all child user controls of this control to disabled/enabled:

internal

 

void OpenPopUp(string headerText, PopUpContent popUpContent)

 

{

 

this.PopUpContent = popUpContent;

 

 

this.PopUpHeader = headerText;

 

 

this.basePopUp.Visibility = Visibility.Visible;

 

 

this.ucNavigation.IsEnabled = false;

 

 

this.ucProperties.IsEnabled = false;

 

 

this.ucRollupGeneral.IsEnabled = false;

 

 

this.ucTerritories.IsEnabled = false;

 

 

}

 


internal
void ClosePopUp()

 

{

 

this.ucNavigation.IsEnabled = true;

 

 

this.ucProperties.IsEnabled = true;

 

 

this.ucRollupGeneral.IsEnabled = true;

 

 

this.ucTerritories.IsEnabled = true;

 

 

this.basePopUp.Visibility = Visibility.Collapsed;

 

}


The child user control called ucNavigation uses a RadTreeView to display data. Disabling the RadTreeView works like a charm, but if I set the parent control back to IsEnabled = true, the RadTreeView remains partly disabled. By partly I mean, that it remains disabled for mouse input but not for keyboard input and it is stuck in the "Disabled" visual state.

After reading this tread, I updated to
the 2009.2.701.1020 version of the "RadControls for Silverlight" and I'm still experiencing this phenomenon. What am I doing wrong?
Could somebody please enlighten me?

Christian
0
Valentin.Stoychev
Telerik team
answered on 01 Sep 2009, 01:17 PM
Hello Christian,

This is fixed in the latest build of RadControls - 0812. Please note that this is a SL3 build.

Regards,
Valentin.Stoychev
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.
0
Christian
Top achievements
Rank 1
answered on 01 Sep 2009, 01:37 PM
Hi Valentin,

Thanks for your quick answer. The support here really is topnotch.
Unfortunately I'm stuck with Silverlight 2.0 and it is not for me to decide whether I can migrate to silverlight 3.0.
On the other hand: I've been nagging my boss for quite some time now about updating and this gives me more ammunition.

Yours,
Christian
0
Valentin.Stoychev
Telerik team
answered on 01 Sep 2009, 02:30 PM
Hi Christian,

Yes - afer the Q2.SP1 release we moved all our new developments to SL3. I can say that almost all of our users are also using SL3 now.

Silverlight is a fast moving platform currently and it is recommended to use the latest framework while developing your application.

All the best,
Valentin.Stoychev
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.
0
Christian
Top achievements
Rank 1
answered on 02 Sep 2009, 08:22 AM
Hi Valentin,

Yeah, I know. Do tell this to the decision makers in my project. ;)
That's what I keeping saying over and over again.

Yours,
Christian
0
Christian
Top achievements
Rank 1
answered on 25 Sep 2009, 07:32 AM
Hi,
I was finally able to upgrade our project to Silverlight 3 and we are now using the RadControls version 2009.2.812.1030. The problem is, I still have trouble with the RadTreeView. If I disable a user control on which a RadTreeView was placed, the tree view control is disabled too. So far so good. But if I set the user control back to enabled, the RadTreeView control will still be disabled. What I am doing wrong?

Christian
0
Valentin.Stoychev
Telerik team
answered on 25 Sep 2009, 07:36 AM
Hi Christian,

What version of the controls are you using? We are not aware of this issue with the latest binaries.

Greetings,
Valentin.Stoychev
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.
0
Christian
Top achievements
Rank 1
answered on 25 Sep 2009, 07:39 AM
Hi Valentin,

Thanks for your quick reply. As I wrote above, we are using version 2009.2.812.1030.

Yours,
Christian
0
Christian
Top achievements
Rank 1
answered on 25 Sep 2009, 09:17 AM
You are right, Valentin. The 2009.2.812.1030 version of the RadTreeView DOES work correctly. We are using an application-wide theme, which was made by a design company and this causes the issue. If I disable the theming for the trees, they will work just fine. I guess, now I have to investigate in this direction.

Tags
TreeView
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
hwsoderlund
Top achievements
Rank 1
Christian
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or